[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/Security/tests - testPermissionRegistry.py:1.1.2.13.14.1

Steve Alexander steve@cat-box.net
Fri, 31 May 2002 19:31:53 -0400


Update of /cvs-repository/Zope3/lib/python/Zope/App/Security/tests
In directory cvs.zope.org:/tmp/cvs-serv27552/tests

Modified Files:
      Tag: Zope3InWonderland-branch
	testPermissionRegistry.py 
Log Message:
Permission ids must not start with a dot.


=== Zope3/lib/python/Zope/App/Security/tests/testPermissionRegistry.py 1.1.2.13 => 1.1.2.13.14.1 ===
         self.assertEqual(None, permissionRegistry.getPermission('Foo'))
         self.failIf(permissionRegistry.definedPermission('Foo'))
+        
+    def testPermissionStartsWithDot(self):
+        self.assertRaises(ValueError, permissionRegistry.definePermission,
+                          '.Foo', 'dot foo title')
 
     def testPermissionIsAnIPermission(self):
         permissionRegistry.definePermission('Foo', 'foo title')
@@ -56,7 +60,7 @@
         permission = permissionRegistry.getPermission('Foo')
         eq(permission.getTitle(), 'Foo-able')
         eq(permission.getDescription(), 'A foo-worthy permission')
-    
+
 
 def test_suite():
     loader=unittest.TestLoader()