# HG changeset patch # User Marcin Kuzminski # Date 2012-07-11 08:48:41 # Node ID 146480218785658e1ca7dfb2a052008efc653fb8 # Parent 32dd6896abcffee99db7ddcca44dfc522635cc4e small test fix to fix rare travis build issues diff --git a/rhodecode/tests/models/test_notifications.py b/rhodecode/tests/models/test_notifications.py --- a/rhodecode/tests/models/test_notifications.py +++ b/rhodecode/tests/models/test_notifications.py @@ -61,14 +61,16 @@ class TestNotifications(unittest.TestCas notifications = Notification.query().all() self.assertEqual(len(notifications), 1) + self.assertEqual(notifications[0].recipients, [u1, u2]) + self.assertEqual(notification.notification_id, + notifications[0].notification_id) + unotification = UserNotification.query()\ .filter(UserNotification.notification == notification).all() - self.assertEqual(notifications[0].recipients, [u1, u2]) - self.assertEqual(notification.notification_id, - notifications[0].notification_id) self.assertEqual(len(unotification), len(usrs)) - self.assertEqual([x.user.user_id for x in unotification], usrs) + self.assertEqual(set([x.user.user_id for x in unotification]), + set(usrs)) def test_user_notifications(self): self.assertEqual([], Notification.query().all())