blob: a78fe514a64b3b8c0bed7145e6d0c308dc48a688 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
import unittest
from zope.component.testing import PlacelessSetup
class Base(PlacelessSetup):
def setUp(self):
PlacelessSetup.setUp(self)
def tearDown(self):
PlacelessSetup.tearDown(self)
def _zcmlConfigure(self):
import repoze.bfg
import zope.configuration.xmlconfig
zope.configuration.xmlconfig.file('configure.zcml', package=repoze.bfg)
def _getTemplatePath(self, name):
import os
here = os.path.abspath(os.path.dirname(__file__))
return os.path.join(here, 'fixtures', name)
class ViewFactoryTests(unittest.TestCase):
def _getTargetClass(self):
from repoze.bfg.view import ViewFactory
return ViewFactory
def _makeOne(self, *arg, **kw):
klass = self._getTargetClass()
return klass(*arg, **kw)
def test_call(self):
view = self._makeOne(None, None)
self.assertRaises(NotImplementedError, view)
|