Author: astaric
Date: Mon Aug 26 08:33:55 2013
New Revision: 1517459

URL: http://svn.apache.org/r1517459
Log:
Fixed notification tests.

Notifications are no longer created in api, so
they have to be constructed manually in tests.
Refs: #644

Modified:
    bloodhound/trunk/bloodhound_relations/bhrelations/tests/notification.py

Modified: 
bloodhound/trunk/bloodhound_relations/bhrelations/tests/notification.py
URL: 
http://svn.apache.org/viewvc/bloodhound/trunk/bloodhound_relations/bhrelations/tests/notification.py?rev=1517459&r1=1517458&r2=1517459&view=diff
==============================================================================
--- bloodhound/trunk/bloodhound_relations/bhrelations/tests/notification.py 
(original)
+++ bloodhound/trunk/bloodhound_relations/bhrelations/tests/notification.py Mon 
Aug 26 08:33:55 2013
@@ -69,8 +69,7 @@ class NotificationTestCase(BaseRelations
         relation = self.relations_system.add(
             ticket, ticket2, "dependent")
 
-        rn = RelationNotifyEmail(self.env)
-        rn.notify(relation)
+        self.notifier.notify(relation)
 
         recipients = self.smtpd.get_recipients()
         # checks there is no duplicate in the recipient list
@@ -95,7 +94,8 @@ class NotificationTestCase(BaseRelations
         ticket = self._insert_and_load_ticket('Foo', reporter='anonymous')
         ticket2 = self._insert_and_load_ticket('Bar', reporter='anonymous')
 
-        self.relations_system.add(ticket, ticket2, "dependent")
+        relation = self.relations_system.add(ticket, ticket2, "dependent")
+        self.notifier.notify(relation)
 
         sender = self.smtpd.get_sender()
         recipients = self.smtpd.get_recipients()
@@ -110,6 +110,7 @@ class NotificationTestCase(BaseRelations
         ticket2 = self._insert_and_load_ticket('Bar', reporter='anonymous')
 
         relation = self.relations_system.add(ticket, ticket2, "dependent")
+        self.notifier.notify(relation)
 
         relations = self.env.db_direct_query(
             "SELECT * FROM bloodhound_relations")


Reply via email to