[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/Security/tests - testPermissionRegistry.py:1.1.2.9 testRoleRegistry.py:1.1.2.5
Jim Fulton
jim@zope.com
Fri, 28 Dec 2001 11:22:00 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/App/Security/tests
In directory cvs.zope.org:/tmp/cvs-serv20747/tests
Modified Files:
Tag: Zope-3x-branch
testPermissionRegistry.py testRoleRegistry.py
Log Message:
Changed 'get' methods in registries to return None if no matching
object can be found.
=== Zope3/lib/python/Zope/App/Security/tests/testPermissionRegistry.py 1.1.2.8 => 1.1.2.9 ===
def tearDown(self):
permissionRegistry._clear()
+
+ setUp = tearDown
def testEmptyPermissions(self):
- self.assertRaises(LookupError, permissionRegistry.getPermission, 'Foo')
+ self.assertEqual(None, permissionRegistry.getPermission('Foo'))
self.failIf(permissionRegistry.definedPermission('Foo'))
def testPermissionIsAnIPermission(self):
=== Zope3/lib/python/Zope/App/Security/tests/testRoleRegistry.py 1.1.2.4 => 1.1.2.5 ===
def testEmptyRoles(self):
- self.assertRaises(LookupError, roleRegistry.getRole, 'Foo')
+ self.assertEqual(None, roleRegistry.getRole('Foo'))
self.failIf(roleRegistry.definedRole('Foo'))
def testRoleIsAnIRole(self):