changeset 2361:dccb34282e18

Merge with devel.
author Karol 'grzywacz' Nowak <grzywacz@sul.uni.lodz.pl>
date Wed, 11 Jul 2007 14:14:09 +0200
parents cc6dd879104c (current diff) 6a24e3a77aea (diff)
children 2332678361bd
files
diffstat 1 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/_tests/test_events.py	Wed Jul 11 13:53:03 2007 +0200
+++ b/MoinMoin/_tests/test_events.py	Wed Jul 11 14:14:09 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"]