[Zope3-checkins] CVS: Zope3/src/zope/app/browser/services/tests - test_field_widget.py:1.8
Jim Fulton
jim@zope.com
Tue, 3 Jun 2003 17:43:29 -0400
Update of /cvs-repository/Zope3/src/zope/app/browser/services/tests
In directory cvs.zope.org:/tmp/cvs-serv29620/src/zope/app/browser/services/tests
Modified Files:
test_field_widget.py
Log Message:
Refactored the setup machinery for placefull tests.
Most of the setup code is now available in stand-alone functions in
zope.app.tests.setup. These include high-level functions for setting
up service managers and services.
Simplified existing tests to use the new setup facilities, removing
lots of icky code.
=== Zope3/src/zope/app/browser/services/tests/test_field_widget.py 1.7 => 1.8 ===
--- Zope3/src/zope/app/browser/services/tests/test_field_widget.py:1.7 Sun Mar 23 17:35:36 2003
+++ Zope3/src/zope/app/browser/services/tests/test_field_widget.py Tue Jun 3 17:42:58 2003
@@ -57,9 +57,7 @@
return ComponentPathWidget(field, request)
def setUp(self):
- PlacefulSetup.setUp(self)
- self.buildFolders()
- self.rootFolder.setServiceManager(ServiceManager())
+ PlacefulSetup.setUp(self, site=True)
default = traverse(self.rootFolder, '++etc++site/default')
default.setObject('c1', C())
default.setObject('c2', C())