示例#1
0
 def test_it_with_no_registry(self):
     from pyramid.config import global_registries
     # keep registry local so that global_registries is cleared after
     registry = DummyRegistry(DummyFactory)
     global_registries.add(registry)
     request = self._callFUT('/hello')
     self.assertEqual(request.environ['path'], '/hello')
     self.assertEqual(request.registry, registry)
     global_registries.empty()
示例#2
0
 def test_it_with_no_registry(self):
     from pyramid.config import global_registries
     registry = self._makeRegistry()
     global_registries.add(registry)
     try:
         request = self._callFUT('/hello')
         self.assertEqual(request.environ['path'], '/hello')
         self.assertEqual(request.registry, registry)
     finally:
         global_registries.empty()
示例#3
0
 def test_it_with_no_registry(self):
     from pyramid.config import global_registries
     registry = self._makeRegistry()
     global_registries.add(registry)
     try:
         request = self._callFUT('/hello')
         self.assertEqual(request.environ['path'], '/hello')
         self.assertEqual(request.registry, registry)
     finally:
         global_registries.empty()
示例#4
0
 def test_it_with_no_registry(self):
     from pyramid.config import global_registries
     # keep registry local so that global_registries is cleared after
     registry = DummyRegistry(DummyFactory)
     global_registries.add(registry)
     try:
         request = self._callFUT('/hello')
         self.assertEqual(request.environ['path'], '/hello')
         self.assertEqual(request.registry, registry)
     finally:
         global_registries.empty()
示例#5
0
    def setUp(self):
        from pyramid.config import global_registries

        global_registries.empty()
示例#6
0
    def setUp(self):
        from pyramid.config import global_registries

        global_registries.empty()