diff options
| author | Theron Luhn <theron@luhn.com> | 2019-12-14 22:46:51 -0800 |
|---|---|---|
| committer | Theron Luhn <theron@luhn.com> | 2019-12-14 22:46:51 -0800 |
| commit | dc4241edd6d433224f62aece153741f7ea63569a (patch) | |
| tree | 366fcbeb260ea91d46029472699b7bb4a669ce7c | |
| parent | 2e06fa414412688dc3b7e0b422b0fc0b96ec882f (diff) | |
| download | pyramid-dc4241edd6d433224f62aece153741f7ea63569a.tar.gz pyramid-dc4241edd6d433224f62aece153741f7ea63569a.tar.bz2 pyramid-dc4241edd6d433224f62aece153741f7ea63569a.zip | |
Fix coverage.
| -rw-r--r-- | tests/test_security.py | 9 | ||||
| -rw-r--r-- | tests/test_viewderivers.py | 3 |
2 files changed, 9 insertions, 3 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): diff --git a/tests/test_viewderivers.py b/tests/test_viewderivers.py index 48a564c7b..e47296b50 100644 --- a/tests/test_viewderivers.py +++ b/tests/test_viewderivers.py @@ -2086,9 +2086,6 @@ class DummySecurityPolicy: def identify(self, request): return 123 - def authenticated_userid(self, request): - return 123 - def permits(self, request, context, identity, permission): return self.permitted |
