[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/OFS/Services/RoleService/tests - testRoleService.py:1.4

Jim Fulton jim@zope.com
Sun, 23 Jun 2002 13:04:14 -0400


Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/Services/RoleService/tests
In directory cvs.zope.org:/tmp/cvs-serv11667/lib/python/Zope/App/OFS/Services/RoleService/tests

Modified Files:
	testRoleService.py 
Log Message:
Finished implementing
http://dev.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/AddMenuProposalAndEndOfZmiNamespace

Updated the service manager to use a menu.

Ripped out the old adder registry code.



=== Zope3/lib/python/Zope/App/OFS/Services/RoleService/tests/testRoleService.py 1.3 => 1.4 ===
         
         from Zope.App.OFS.Services.RoleService.Role import Role
-        r = Role()
-        r.setId("Hacker")
+        r = Role("Hacker","","")
         self.rs.setObject("Hacker", r)
         self.assertEqual(self.rs.getRole('Hacker').getId(), 'Hacker')
         self.assertEqual(self.rs.getRole('Manager').getId(), 'Manager')
@@ -64,8 +63,7 @@
         self.roleRegistry.defineRole('Manager', 'Manager', '')
         
         from Zope.App.OFS.Services.RoleService.Role import Role
-        r = Role()
-        r.setId("Hacker")
+        r = Role("Hacker","","")
         self.rs.setObject("Hacker", r)
         self.createServiceManager(self.folder1)
         self.sm1=getServiceManager(self.folder1)
@@ -74,8 +72,7 @@
         self.sm1.setObject("myRoleService", self.rs1)
         self.sm1.bindService("RoleService","myRoleService")
         self.rs1=self.sm1.getService("RoleService")
-        r1=Role()
-        r1.setId("Reviewer")
+        r1=Role("Reviewer",'','')
         self.rs1.setObject("Reviewer", r1)
         self.assertEqual(self.rs1.getRole('Hacker').getId(), 'Hacker')
         self.assertEqual(self.rs1.getRole('Manager').getId(), 'Manager')