diff options
Diffstat (limited to 'tests/test_security.py')
| -rw-r--r-- | tests/test_security.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test_security.py b/tests/test_security.py index 3896e008d..a555fd7f6 100644 --- a/tests/test_security.py +++ b/tests/test_security.py @@ -165,6 +165,15 @@ class TestPrincipalsAllowedByPermission(unittest.TestCase): result = self._callFUT(context, 'view') self.assertEqual(result, [Everyone]) + def test_with_authorization_policy(self): + from pyramid.threadlocal import get_current_registry + + registry = get_current_registry() + _registerAuthorizationPolicy(registry, 'yo') + context = DummyContext() + result = self._callFUT(context, 'view') + self.assertEqual(result, 'yo') + class TestRemember(unittest.TestCase): def setUp(self): |
