[Zope3-checkins]
SVN: Zope3/branches/jim-adapter/src/zope/app/event/tests/test_objectevent.py
Remove old test fixtures
Philipp von Weitershausen
philikon at philikon.de
Fri Apr 7 09:05:03 EDT 2006
Log message for revision 66645:
Remove old test fixtures
Changed:
U Zope3/branches/jim-adapter/src/zope/app/event/tests/test_objectevent.py
-=-
Modified: Zope3/branches/jim-adapter/src/zope/app/event/tests/test_objectevent.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/event/tests/test_objectevent.py 2006-04-07 12:46:28 UTC (rev 66644)
+++ Zope3/branches/jim-adapter/src/zope/app/event/tests/test_objectevent.py 2006-04-07 13:05:02 UTC (rev 66645)
@@ -18,13 +18,7 @@
import unittest
import zope.component.event
from zope.testing import doctest
-from zope.component.interfaces import IObjectEvent
-from zope.annotation.interfaces import IAnnotations, IAnnotatable
-from zope.annotation.interfaces import IAttributeAnnotatable
-from zope.annotation.attribute import AttributeAnnotations
-from zope.app.dublincore.interfaces import IZopeDublinCore
-from zope.app.dublincore.annotatableadapter import ZDCAnnotatableAdapter
from zope.app.container.contained import Contained, ObjectRemovedEvent
from zope.app.container.interfaces import IContained, IObjectRemovedEvent
from zope.app.container.sample import SampleContainer
@@ -32,10 +26,14 @@
from zope.app.testing import ztapi
class TestObjectEventNotifications(unittest.TestCase):
+
def setUp(self):
self.callbackTriggered = False
setUp()
+ def tearDown(self):
+ tearDown()
+
def testNotify(self):
events = []
@@ -79,27 +77,9 @@
# del container['Fred'] will fire an ObjectRemovedEvent event.
self.assertRaises(Veto, container.__delitem__, 'Fred')
- def tearDown(self):
- tearDown()
-
-def setUpObjectEventDocTest(test):
- setUp()
-
- ztapi.provideAdapter(IAttributeAnnotatable,
- IAnnotations, AttributeAnnotations)
- ztapi.provideAdapter(IAnnotatable,
- IZopeDublinCore, ZDCAnnotatableAdapter)
-
-def tearDownObjectEventDocTest(test) :
- tearDown()
-
def test_suite():
return unittest.TestSuite((
unittest.makeSuite(TestObjectEventNotifications),
- doctest.DocTestSuite("zope.app.event.objectevent",
- setUp=setUpObjectEventDocTest,
- tearDown=tearDownObjectEventDocTest,
- optionflags=doctest.NORMALIZE_WHITESPACE),
))
if __name__=='__main__':
More information about the Zope3-Checkins
mailing list