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()
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()
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()
def setUp(self): from pyramid.config import global_registries global_registries.empty()