[Zope3-checkins] CVS: Zope3/src/zope/app/event/tests -
test_objectevent.py:1.11
Nathan Yergler
nathan at yergler.net
Tue Mar 30 16:48:21 EST 2004
Update of /cvs-repository/Zope3/src/zope/app/event/tests
In directory cvs.zope.org:/tmp/cvs-serv8257/src/zope/app/event/tests
Modified Files:
test_objectevent.py
Log Message:
Moved tests for ObserverEvent event channel into zope.app.observable.
=== Zope3/src/zope/app/event/tests/test_objectevent.py 1.10 => 1.11 ===
--- Zope3/src/zope/app/event/tests/test_objectevent.py:1.10 Tue Mar 30 09:13:24 2004
+++ Zope3/src/zope/app/event/tests/test_objectevent.py Tue Mar 30 16:47:50 2004
@@ -53,62 +53,6 @@
class TestObjectContentModifiedEvent(TestObjectModifiedEvent):
klass = ObjectContentModifiedEvent
-class DummyObservable:
- implements(IObservable)
-
- def __init__(self):
- self.flag = False
-
- def notify(self, event, provided):
- self.flag = True
-
-class DummyNotObservable:
-
- def __init__(self):
- self.flag = False
-
- def notify(self, event, provided):
- self.flag = True
-
-class DummyObservableEvent:
- implements(IObjectRemovedEvent, IObservable)
-
- def __init__(self):
- self.object = DummyObservable()
-
-class DummyNotObservableEvent:
- implements(IObjectRemovedEvent)
-
- def __init__(self):
- self.object = DummyNotObservable()
-
-class TestObserverEventNotifications:
-
- def testObservableEvents(self):
- """
- When an object that has subscriptions change, the
- subscribers are notified.
-
- >>> event = DummyObservableEvent()
- >>> notifier = objectevent.ObserverEventNotifier()
- >>> notifier.notify(event)
- >>> event.object.flag
- True
- """
-
- def testNotObservableEvents(self):
- """
-
- When an object that has no subscriptions changes, the
- ObserverEventNotifier doesn't do anything to it.
-
- >>> event = DummyNotObservableEvent()
- >>> notifier = objectevent.ObserverEventNotifier()
- >>> notifier.notify(event)
- >>> event.object.flag
- False
- """
-
class TestObjectEventNotifications(unittest.TestCase):
def setUp(self):
self.callbackTriggered = False
@@ -173,7 +117,6 @@
unittest.makeSuite(TestObjectAnnotationsModifiedEvent),
unittest.makeSuite(TestObjectContentModifiedEvent),
unittest.makeSuite(TestObjectEventNotifications),
- doctest.DocTestSuite(),
))
if __name__=='__main__':
More information about the Zope3-Checkins
mailing list