[Zope3-checkins] CVS: Zope3/src/zope/app/services/tests -
test_auth.py:1.19 test_field.py:1.12 test_module.py:1.11
test_roleservice.py:1.5
Jim Fulton
jim at zope.com
Sun Sep 21 13:31:17 EDT 2003
Update of /cvs-repository/Zope3/src/zope/app/services/tests
In directory cvs.zope.org:/tmp/cvs-serv12246/src/zope/app/services/tests
Modified Files:
test_auth.py test_field.py test_module.py test_roleservice.py
Log Message:
Changed to use __setitem__ rather than setObject
=== Zope3/src/zope/app/services/tests/test_auth.py 1.18 => 1.19 ===
--- Zope3/src/zope/app/services/tests/test_auth.py:1.18 Mon Jul 28 07:45:31 2003
+++ Zope3/src/zope/app/services/tests/test_auth.py Sun Sep 21 13:30:46 2003
@@ -58,12 +58,11 @@
sm = traverse(self.rootFolder, '++etc++site')
auth = setup.addService(sm, Authentication, AuthenticationService())
- auth.setObject('srichter', User('srichter', 'Stephan', 'Richter',
- 'srichter', 'hello'))
- auth.setObject('jim', User('jim', 'Jim', 'Fulton',
- 'jim', 'hello2'))
- auth.setObject('stevea', User('stevea', 'Steve', 'Alexander',
- 'stevea', 'hello3'))
+ auth['srichter'] = User('srichter', 'Stephan', 'Richter',
+ 'srichter', 'hello')
+ auth['jim'] = User('jim', 'Jim', 'Fulton', 'jim', 'hello2')
+ auth['stevea'] = User('stevea', 'Steve', 'Alexander',
+ 'stevea', 'hello3')
self._auth = auth
=== Zope3/src/zope/app/services/tests/test_field.py 1.11 => 1.12 ===
--- Zope3/src/zope/app/services/tests/test_field.py:1.11 Sun Aug 17 02:08:20 2003
+++ Zope3/src/zope/app/services/tests/test_field.py Sun Sep 21 13:30:46 2003
@@ -39,8 +39,8 @@
def createObjects(self):
self.buildFolders()
- self.folder1.setObject('c', C())
- self.folder1.setObject('d', D())
+ self.folder1['c'] = C()
+ self.folder1['d'] = D()
def createFields(self):
from zope.app.services.field import ComponentPath
=== Zope3/src/zope/app/services/tests/test_module.py 1.10 => 1.11 ===
--- Zope3/src/zope/app/services/tests/test_module.py:1.10 Mon Jun 30 12:25:23 2003
+++ Zope3/src/zope/app/services/tests/test_module.py Sun Sep 21 13:30:46 2003
@@ -58,7 +58,7 @@
self.sm = traverse(self.rootFolder, "++etc++site")
default = traverse(self.sm, "default")
old_called = called
- default.setObject(NAME, Manager(NAME, SOURCE))
+ default[NAME] = Manager(NAME, SOURCE)
self.manager = traverse(default, NAME)
self.assertEqual(called, old_called)
self.manager.execute()
=== Zope3/src/zope/app/services/tests/test_roleservice.py 1.4 => 1.5 ===
--- Zope3/src/zope/app/services/tests/test_roleservice.py:1.4 Tue Jun 3 18:46:22 2003
+++ Zope3/src/zope/app/services/tests/test_roleservice.py Sun Sep 21 13:30:46 2003
@@ -46,7 +46,7 @@
self.roleRegistry.defineRole('Manager', 'Manager', '')
r = Role("Hacker","","")
- self.rs.setObject("Hacker", r)
+ self.rs["Hacker"] = r
self.assertEqual(self.rs.getRole('Hacker').getId(), 'Hacker')
self.assertEqual(self.rs.getRole('Manager').getId(), 'Manager')
@@ -59,13 +59,13 @@
self.roleRegistry.defineRole('Manager', 'Manager', '')
r = Role("Hacker","","")
- self.rs.setObject("Hacker", r)
+ self.rs["Hacker"] = r
sm1 = self.makeSite('folder1')
rs1 = setup.addService(sm1, 'Roles', RoleService())
r1 = Role("Reviewer",'','')
- rs1.setObject("Reviewer", r1)
+ rs1["Reviewer"] = r1
self.assertEqual(rs1.getRole('Hacker').getId(), 'Hacker')
self.assertEqual(rs1.getRole('Manager').getId(), 'Manager')
More information about the Zope3-Checkins
mailing list