diff options
| author | Bert JW Regeer <bertjw@regeer.org> | 2020-07-12 16:52:48 -0700 |
|---|---|---|
| committer | Bert JW Regeer <bertjw@regeer.org> | 2020-07-12 16:52:48 -0700 |
| commit | a920c2530c130688c5d01ed999a43ccf0cb012fa (patch) | |
| tree | 43ab0c4b6db6c05418340e9e18f188e09a02f9ff /tests/test_security.py | |
| parent | 4481cfeef8b2fd90a485f2f871e9689750b48220 (diff) | |
| download | pyramid-a920c2530c130688c5d01ed999a43ccf0cb012fa.tar.gz pyramid-a920c2530c130688c5d01ed999a43ccf0cb012fa.tar.bz2 pyramid-a920c2530c130688c5d01ed999a43ccf0cb012fa.zip | |
Run isort 5.x across code base
Diffstat (limited to 'tests/test_security.py')
| -rw-r--r-- | tests/test_security.py | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/tests/test_security.py b/tests/test_security.py index 72598f570..efaf9b4bf 100644 --- a/tests/test_security.py +++ b/tests/test_security.py @@ -243,10 +243,10 @@ class TestViewExecutionPermitted(unittest.TestCase): return view_execution_permitted(*arg, **kw) def _registerSecuredView(self, view_name, allow=True): - from pyramid.threadlocal import get_current_registry from zope.interface import Interface - from pyramid.interfaces import ISecuredView - from pyramid.interfaces import IViewClassifier + + from pyramid.interfaces import ISecuredView, IViewClassifier + from pyramid.threadlocal import get_current_registry class Checker: def __permitted__(self, context, request): @@ -266,10 +266,9 @@ class TestViewExecutionPermitted(unittest.TestCase): def test_no_permission(self): from zope.interface import Interface + + from pyramid.interfaces import ISettings, IView, IViewClassifier from pyramid.threadlocal import get_current_registry - from pyramid.interfaces import ISettings - from pyramid.interfaces import IView - from pyramid.interfaces import IViewClassifier settings = dict(debug_authorization=True) reg = get_current_registry() @@ -291,8 +290,8 @@ class TestViewExecutionPermitted(unittest.TestCase): self.assertEqual(result, True) def test_no_view_registered(self): - from pyramid.threadlocal import get_current_registry from pyramid.interfaces import ISettings + from pyramid.threadlocal import get_current_registry settings = dict(debug_authorization=True) reg = get_current_registry() @@ -302,8 +301,8 @@ class TestViewExecutionPermitted(unittest.TestCase): self.assertRaises(TypeError, self._callFUT, context, request, '') def test_with_permission(self): - from zope.interface import Interface - from zope.interface import directlyProvides + from zope.interface import Interface, directlyProvides + from pyramid.interfaces import IRequest class IContext(Interface): @@ -459,8 +458,8 @@ class TestHasPermission(unittest.TestCase): testing.tearDown() def _makeOne(self): - from pyramid.security import SecurityAPIMixin from pyramid.registry import Registry + from pyramid.security import SecurityAPIMixin mixin = SecurityAPIMixin() mixin.registry = Registry() |
