changeset 2360:6a24e3a77aea

Fix test_events so that it works with updated code.
author Karol 'grzywacz' Nowak <grzywacz@sul.uni.lodz.pl>
date Wed, 11 Jul 2007 14:13:34 +0200
parents 1d60f9aa07d1
children dccb34282e18 590caeeca03a
files MoinMoin/_tests/test_events.py
diffstat 1 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/_tests/test_events.py	Wed Jul 11 02:50:00 2007 +0200
+++ b/MoinMoin/_tests/test_events.py	Wed Jul 11 14:13:34 2007 +0200
@@ -54,33 +54,37 @@
     print "User is subscribed to this event and wants to get notified by jabber."
     print "This means, that he should stay on the list."
     user.notify_by_jabber = True
+    user.jid = "user@example.com"
     user.subscribed_events = [events.Event.__name__]
     subscribers = {"en": [user]}
-    jabbernotify._filter_subscriber_list(event, subscribers)
+    notification.filter_subscriber_list(event, subscribers, True)
     assert subscribers["en"]
 
     print "User is subscribed to this event, but doesn't want to get notified by jabber."
     print "The list should be empty."
     user.notify_by_jabber = False
+    user.jid = "user@example.com"
     user.subscribed_events = [events.Event.__name__]
     subscribers = {"en": [user]}
-    jabbernotify._filter_subscriber_list(event, subscribers)
+    notification.filter_subscriber_list(event, subscribers, True)
     assert not subscribers["en"]
 
     print "User is not subscribed to this event, but wants to get notfied by jabber."
     print "The list should be empty."
     user.notify_by_jabber = True
+    user.jid = "user@example.com"
     user.subscribed_events = []
     subscribers = {"en": [user]}
-    jabbernotify._filter_subscriber_list(event, subscribers)
+    notification.filter_subscriber_list(event, subscribers, True)
     assert not subscribers["en"]
 
     print "User is neither subscribed to this event, nor wants jabber notifications."
     print "The list should be empty."
     user.notify_by_jabber = False
     user.subscribed_events = []
+    user.jid = "user@example.com"
     subscribers = {"en": [user]}
-    jabbernotify._filter_subscriber_list(event, subscribers)
+    notification.filter_subscriber_list(event, subscribers, True)
     assert not subscribers["en"]
 
 coverage_modules = ["MoinMoin.events"]