diff options
| author | Theron Luhn <theron@luhn.com> | 2019-04-15 19:04:35 -0700 |
|---|---|---|
| committer | Theron Luhn <theron@luhn.com> | 2019-04-15 19:04:35 -0700 |
| commit | 47f8935bb5423718ec293bba4709307be7d2f51c (patch) | |
| tree | 2ef48e54dfbf82c9aa52a7fe1ef1fb6cac1ffb48 /tests/test_security.py | |
| parent | 8536f3ab834b4da7cc24a88855a3f883929b5b1e (diff) | |
| download | pyramid-47f8935bb5423718ec293bba4709307be7d2f51c.tar.gz pyramid-47f8935bb5423718ec293bba4709307be7d2f51c.tar.bz2 pyramid-47f8935bb5423718ec293bba4709307be7d2f51c.zip | |
Stringify identity in legacy authenticated_userid.
Diffstat (limited to 'tests/test_security.py')
| -rw-r--r-- | tests/test_security.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/test_security.py b/tests/test_security.py index b66632baa..97aec42c6 100644 --- a/tests/test_security.py +++ b/tests/test_security.py @@ -357,8 +357,9 @@ class TestAuthenticatedUserId(unittest.TestCase): def test_with_security_policy(self): request = _makeRequest() - _registerSecurityPolicy(request.registry, 'yo') - self.assertEqual(request.authenticated_userid, 'yo') + # Ensure the identity is stringified. + _registerSecurityPolicy(request.registry, 123) + self.assertEqual(request.authenticated_userid, '123') def test_with_authentication_policy_no_reg_on_request(self): from pyramid.threadlocal import get_current_registry |
