Пример #1
0
class ViewTests(unittest.TestCase):
    def setUp(self):
        self.config = testing.setUp()
        self.request = testing.DummyRequest()
        self.request.registry = Mock()
        self.request.registry.object_store = Mock()
        self.view = AugeiasView(self.request)

    def tearDown(self):
        testing.tearDown()

    def test_my_view(self):
        info = self.view.my_view()
        self.assertEqual(info['project'], 'augeias')
Пример #2
0
 def setUp(self):
     self.config = testing.setUp()
     self.request = testing.DummyRequest()
     self.request.registry = Mock()
     self.request.registry.object_store = Mock()
     self.view = AugeiasView(self.request)