[Zope3-checkins] CVS: Zope3/lib/python/Zope/App/OFS/Services/ObjectHub/tests - ObjectHubSetup.py:1.4
Marius Gedminas
mgedmin@codeworks.lt
Wed, 11 Dec 2002 04:04:09 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/Services/ObjectHub/tests
In directory cvs.zope.org:/tmp/cvs-serv31269/lib/python/Zope/App/OFS/Services/ObjectHub/tests
Modified Files:
ObjectHubSetup.py
Log Message:
Eliminate strange for loops in unit tests
=== Zope3/lib/python/Zope/App/OFS/Services/ObjectHub/tests/ObjectHubSetup.py 1.3 => 1.4 ===
--- Zope3/lib/python/Zope/App/OFS/Services/ObjectHub/tests/ObjectHubSetup.py:1.3 Sat Nov 30 13:37:17 2002
+++ Zope3/lib/python/Zope/App/OFS/Services/ObjectHub/tests/ObjectHubSetup.py Wed Dec 11 04:04:08 2002
@@ -53,13 +53,5 @@
configuration = ServiceConfiguration("ObjectHub", path)
configure = traverse(default, 'configure')
- configure.setObject("myObjectHubDir", configuration)
-
- for i in range(1, 100):
- c = traverse(configure, str(i))
- if c == configuration:
- break
- i += 1
-
- c.status = Active
-
+ key = configure.setObject("myObjectHubDir", configuration)
+ traverse(configure, key).status = Active