[Zope3-checkins] CVS: Zope3/src/zope/app/services/tests - test_roleservice.py:1.6

Stephan Richter srichter at cosmos.phy.tufts.edu
Sun Dec 14 03:47:32 EST 2003


Update of /cvs-repository/Zope3/src/zope/app/services/tests
In directory cvs.zope.org:/tmp/cvs-serv5589/src/zope/app/services/tests

Modified Files:
	test_roleservice.py 
Log Message:
I have no clue why this test did not fail before. Fixed tests after 
previous changes.


=== Zope3/src/zope/app/services/tests/test_roleservice.py 1.5 => 1.6 ===
--- Zope3/src/zope/app/services/tests/test_roleservice.py:1.5	Sun Sep 21 13:30:46 2003
+++ Zope3/src/zope/app/services/tests/test_roleservice.py	Sun Dec 14 03:47:31 2003
@@ -11,9 +11,8 @@
 # FOR A PARTICULAR PURPOSE.
 #
 ##############################################################################
-"""
+"""Test the Role service.
 
-Revision information:
 $Id$
 """
 
@@ -43,38 +42,42 @@
         self.rs = setup.addService(sm, 'Roles', RoleService())
 
     def testGetRole(self):
-        self.roleRegistry.defineRole('Manager', 'Manager', '')
+        self.roleRegistry.defineRole('zope.Manager', 'Manager', '')
 
-        r = Role("Hacker","","")
-        self.rs["Hacker"] = r
-        self.assertEqual(self.rs.getRole('Hacker').getId(), 'Hacker')
-        self.assertEqual(self.rs.getRole('Manager').getId(), 'Manager')
+        r = Role("zope.Hacker","","")
+        self.rs["zope.Hacker"] = r
+        self.assertEqual(self.rs.getRole('zope.Hacker').getId(), 'zope.Hacker')
+        self.assertEqual(self.rs.getRole('zope.Manager').getId(),
+                         'zope.Manager')
 
         roles = [role.getId() for role in self.rs.getRoles()]
         roles.sort()
 
-        self.assertEqual(roles, ['Anonymous', 'Hacker', 'Manager'])
+        self.assertEqual(roles,
+                         ['zope.Anonymous', 'zope.Hacker', 'zope.Manager'])
 
     def testGetRoleFromLayeredServices(self):
-        self.roleRegistry.defineRole('Manager', 'Manager', '')
+        self.roleRegistry.defineRole('zope.Manager', 'Manager', '')
 
-        r = Role("Hacker","","")
-        self.rs["Hacker"] = r
+        r = Role("zope.Hacker","","")
+        self.rs["zope.Hacker"] = r
 
         sm1 = self.makeSite('folder1')
         rs1 = setup.addService(sm1, 'Roles', RoleService())
 
-        r1 = Role("Reviewer",'','')
-        rs1["Reviewer"] = r1
+        r1 = Role("zope.Reviewer",'','')
+        rs1["zope.Reviewer"] = r1
 
-        self.assertEqual(rs1.getRole('Hacker').getId(), 'Hacker')
-        self.assertEqual(rs1.getRole('Manager').getId(), 'Manager')
-        self.assertEqual(rs1.getRole('Reviewer').getId(), 'Reviewer')
+        self.assertEqual(rs1.getRole('zope.Hacker').getId(), 'zope.Hacker')
+        self.assertEqual(rs1.getRole('zope.Manager').getId(), 'zope.Manager')
+        self.assertEqual(rs1.getRole('zope.Reviewer').getId(), 'zope.Reviewer')
 
         roles = [role.getId() for role in rs1.getRoles()]
         roles.sort()
 
-        self.assertEqual(roles, ['Anonymous', 'Hacker', 'Manager','Reviewer'])
+        self.assertEqual(
+            roles,
+            ['zope.Anonymous', 'zope.Hacker', 'zope.Manager','zope.Reviewer'])
 
 
 




More information about the Zope3-Checkins mailing list