Changeset 6673 for main/waeup.sirp/trunk/src/waeup/sirp/tests
- Timestamp:
- 3 Sep 2011, 23:38:21 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/tests/test_authentication.py
r6617 r6673 4 4 from zope.interface.verify import verifyClass, verifyObject 5 5 from zope.pluggableauth.interfaces import IAuthenticatorPlugin 6 from zope.securitypolicy.interfaces import IPrincipalRoleManager 6 7 from waeup.sirp.testing import FunctionalTestCase, FunctionalLayer 7 8 from waeup.sirp.authentication import ( 8 UserAuthenticatorPlugin, Account, PrincipalInfo )9 UserAuthenticatorPlugin, Account, PrincipalInfo, get_principal_role_manager) 9 10 10 11 class FakeSite(grok.Site, grok.Container): … … 57 58 self.assertTrue(result2 is None) 58 59 return 60 61 def test_get_principal_role_manager(self): 62 # make sure we get different role managers for different situations 63 prm1 = get_principal_role_manager() 64 clearSite(None) 65 prm2 = get_principal_role_manager() 66 self.assertTrue(IPrincipalRoleManager.providedBy(prm1)) 67 self.assertTrue(IPrincipalRoleManager.providedBy(prm2)) 68 self.assertTrue(prm1._context is self.site) 69 self.assertTrue(hasattr(prm2, '_context') is False) 70 return
Note: See TracChangeset for help on using the changeset viewer.