[Zope-CVS] CVS: Products/VerboseSecurity/tests -
testVerboseSecurityPolicy.py:1.2
Shane Hathaway
shane at zope.com
Wed Jun 16 22:38:48 EDT 2004
Update of /cvs-repository/Products/VerboseSecurity/tests
In directory cvs.zope.org:/tmp/cvs-serv20441/tests
Modified Files:
testVerboseSecurityPolicy.py
Log Message:
Version 0.6, which requires Zope 2.7.
=== Products/VerboseSecurity/tests/testVerboseSecurityPolicy.py 1.1 => 1.2 ===
--- Products/VerboseSecurity/tests/testVerboseSecurityPolicy.py:1.1 Thu Aug 22 12:50:05 2002
+++ Products/VerboseSecurity/tests/testVerboseSecurityPolicy.py Wed Jun 16 22:38:46 2004
@@ -59,6 +59,9 @@
class setuidMethod (PublicMethod):
_proxy_roles = sysadmin_roles
+ def getWrappedOwner(self):
+ return None
+
class DangerousMethod (PublicMethod):
# Only accessible to sysadmin or people who use proxy roles
@@ -217,11 +220,15 @@
def testAqNames(self):
policy = self.policy
- assert not policy.validate('', '', 'aq_self', '', None)
- assert not policy.validate('', '', 'aq_base', '', None)
- assert policy.validate('', '', 'aq_parent', '', None)
- assert policy.validate('', '', 'aq_explicit', '', None)
- assert policy.validate('', '', 'aq_inner', '', None)
+ ob = App()
+ ob.__roles__ = None
+ ob = App().__of__(ob)
+ ob.__roles__ = None
+ self.assertPolicyDenies(ob, 'aq_self')
+ self.assertPolicyDenies(ob, 'aq_base')
+ self.assertPolicyAllows(ob, 'aq_parent')
+ self.assertPolicyAllows(ob, 'aq_explicit')
+ self.assertPolicyAllows(ob, 'aq_inner')
if 1:
def testInsaneRoles(self):
More information about the Zope-CVS
mailing list