[Zope3-checkins] CVS: Zope3/src/zope/app/security/tests - test_permissionfield.py:1.8
Jim Fulton
jim@zope.com
Fri, 7 Mar 2003 16:13:51 -0500
Update of /cvs-repository/Zope3/src/zope/app/security/tests
In directory cvs.zope.org:/tmp/cvs-serv8374/tests
Modified Files:
test_permissionfield.py
Log Message:
Updated permission fields to accept CheckerPublic as a value.
=== Zope3/src/zope/app/security/tests/test_permissionfield.py 1.7 => 1.8 ===
--- Zope3/src/zope/app/security/tests/test_permissionfield.py:1.7 Tue Feb 11 21:17:33 2003
+++ Zope3/src/zope/app/security/tests/test_permissionfield.py Fri Mar 7 16:13:49 2003
@@ -17,6 +17,7 @@
"""
from unittest import TestCase, TestSuite, main, makeSuite
+from zope.security.checker import CheckerPublic
from zope.app.security.permission import PermissionField
from zope.schema.interfaces import ValidationError
from zope.app.tests.placelesssetup import PlacelessSetup
@@ -38,6 +39,7 @@
self.assertRaises(ValidationError, field.validate, dummy)
permissionRegistry.definePermission('read', 'Read', 'Read something')
field.validate(permissionRegistry.getPermission('read').getId())
+ field.validate(CheckerPublic)
def test_suite():
return TestSuite((makeSuite(TestPermissionField),))