[z3-checkins] r14556 - z3/Five/branch/philikon-testing/tests
philikon at codespeak.net
philikon at codespeak.net
Tue Jul 12 19:36:26 CEST 2005
Author: philikon
Date: Tue Jul 12 19:36:22 2005
New Revision: 14556
Modified:
z3/Five/branch/philikon-testing/tests/event.txt
z3/Five/branch/philikon-testing/tests/test_event.py
Log:
make test independent of five configuration by using the standard
zope 3 placelesssetup test fixture.
Modified: z3/Five/branch/philikon-testing/tests/event.txt
==============================================================================
--- z3/Five/branch/philikon-testing/tests/event.txt (original)
+++ z3/Five/branch/philikon-testing/tests/event.txt Tue Jul 12 19:36:22 2005
@@ -4,8 +4,8 @@
Before we can start, we need to set up an event subscriber that allows
us to inspect events that will be thrown during the test:
- >>> from zope.app.event.tests.placelesssetup import PlacelessSetup
- >>> PlacelessSetup().setUp()
+ >>> from zope.app.tests.placelesssetup import setUp, tearDown
+ >>> setUp()
Add a folder that doesn't verify objects on paste. We use it as a
test sandbox:
@@ -252,7 +252,6 @@
monkeyed with it:
>>> from Products.Five.eventconfigure import cleanUp
-
>>> cleanUp()
Now adding an object won't trigger an event anymore:
@@ -261,3 +260,7 @@
>>> manage_addSimpleContent(folder, 'foo', 'Foo')
>>> len(getEvents())
0
+
+Finally, we need to tear down everything else (services, etc.)
+
+ >>> tearDown()
Modified: z3/Five/branch/philikon-testing/tests/test_event.py
==============================================================================
--- z3/Five/branch/philikon-testing/tests/test_event.py (original)
+++ z3/Five/branch/philikon-testing/tests/test_event.py Tue Jul 12 19:36:22 2005
@@ -20,8 +20,7 @@
execfile(os.path.join(sys.path[0], 'framework.py'))
def test_suite():
- from Testing.ZopeTestCase import installProduct, ZopeDocFileSuite
- installProduct('Five')
+ from Testing.ZopeTestCase import ZopeDocFileSuite
return ZopeDocFileSuite('event.txt', package="Products.Five.tests")
if __name__ == '__main__':
More information about the z3-checkins
mailing list