diff options
| author | Jason Madden <jamadden@gmail.com> | 2018-08-20 15:02:44 -0500 |
|---|---|---|
| committer | Jason Madden <jamadden@gmail.com> | 2018-08-20 15:02:44 -0500 |
| commit | 1d553ae96dcc185e54cb9832203f6bb42ebda79b (patch) | |
| tree | 03835733e08423683472d8216576adb4ed4554e4 /src/zope/security/tests | |
| parent | 23c968296fe58becae0a5e21f6a745827b7d11cb (diff) | |
| download | zope-security-feature/system-user-regular-object.tar.gz | |
Add ``ISystemPrincipal`` and make ``system_user`` a regular object that implements itfeature/system-user-regular-object
This facilitates adding adapter registrations for the system user.
Diffstat (limited to 'src/zope/security/tests')
| -rw-r--r-- | src/zope/security/tests/test_management.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/zope/security/tests/test_management.py b/src/zope/security/tests/test_management.py index 83aca7b..93ce19d 100644 --- a/src/zope/security/tests/test_management.py +++ b/src/zope/security/tests/test_management.py @@ -170,7 +170,11 @@ class Test(unittest.TestCase): self.assertEqual(checkPermission(None, obj), True) self.assertEqual(checkPermission(CheckerPublic, obj), True) + def test_system_user(self): + from zope.interface.verify import verifyObject + from zope.security.interfaces import IPrincipal + from zope.security.interfaces import ISystemPrincipal from zope.security.management import system_user self.assertEqual(system_user.id, @@ -182,5 +186,9 @@ class Test(unittest.TestCase): self.assertIsInstance(getattr(system_user, name), type(u'')) + verifyObject(IPrincipal, system_user) + verifyObject(ISystemPrincipal, system_user) + + def test_suite(): return unittest.defaultTestLoader.loadTestsFromName(__name__) |
