diff options
Diffstat (limited to 'tests/test_testing.py')
| -rw-r--r-- | tests/test_testing.py | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/tests/test_testing.py b/tests/test_testing.py index e630eb00b..8f912dbd7 100644 --- a/tests/test_testing.py +++ b/tests/test_testing.py @@ -134,8 +134,8 @@ class TestDummyRequest(unittest.TestCase): self.assertEqual(request.environ['PATH_INFO'], '/foo') def test_defaults(self): - from pyramid.threadlocal import get_current_registry from pyramid.testing import DummySession + from pyramid.threadlocal import get_current_registry request = self._makeOne() self.assertEqual(request.method, 'GET') @@ -214,8 +214,8 @@ class TestDummyRequest(unittest.TestCase): def test_registry_is_config_registry_when_setup_is_called_after_ctor(self): # see https://github.com/Pylons/pyramid/issues/165 - from pyramid.registry import Registry from pyramid.config import Configurator + from pyramid.registry import Registry request = self._makeOne() try: @@ -233,8 +233,8 @@ class TestDummyRequest(unittest.TestCase): def test_del_registry(self): # see https://github.com/Pylons/pyramid/issues/165 - from pyramid.registry import Registry from pyramid.config import Configurator + from pyramid.registry import Registry request = self._makeOne() request.registry = 'abc' @@ -249,8 +249,8 @@ class TestDummyRequest(unittest.TestCase): config.end() def test_response_with_responsefactory(self): - from pyramid.registry import Registry from pyramid.interfaces import IResponseFactory + from pyramid.registry import Registry registry = Registry('this_test') @@ -300,7 +300,9 @@ class TestDummyRequest(unittest.TestCase): class TestDummyTemplateRenderer(unittest.TestCase): - def _getTargetClass(self,): + def _getTargetClass( + self, + ): from pyramid.testing import DummyTemplateRenderer return DummyTemplateRenderer @@ -351,9 +353,8 @@ class Test_setUp(unittest.TestCase): self.assertEqual(result, hook) def test_it_defaults(self): - from pyramid.threadlocal import manager - from pyramid.threadlocal import get_current_registry from pyramid.registry import Registry + from pyramid.threadlocal import get_current_registry, manager old = True manager.push(old) @@ -597,6 +598,7 @@ class TestDummySession(unittest.TestCase): ) # see https://github.com/Pylons/pyramid/issues/3237 def test_instance_conforms(self): from zope.interface.verify import verifyObject + from pyramid.interfaces import ISession session = self._makeOne() |
