summaryrefslogtreecommitdiffstats
path: root/apps/patchwork/tests/test_notifications.py
diff options
context:
space:
mode:
authorDamien Lespiau <damien.lespiau@intel.com>2014-11-08 13:25:58 +0000
committerJeremy Kerr <jk@ozlabs.org>2014-11-10 20:27:28 +0800
commit8904a7dcaf959da8db4a9a5d92b91a61eed05201 (patch)
tree3a06642d069587ccc841d10e2f024e777d173278 /apps/patchwork/tests/test_notifications.py
parenta5d803a565aea5b655058ff244e9ae8356004963 (diff)
downloadpatchwork-8904a7dcaf959da8db4a9a5d92b91a61eed05201.tar.bz2
patchwork-8904a7dcaf959da8db4a9a5d92b91a61eed05201.tar.xz
test_notifications: Fix testNotificationUpdated timestamp comparison
With MySQL, the django ORM defaults to mapping DateTimeField to Timestamp and this has only a precision of seconds. Let's use >= here then, which doesn't affect the correctness of this test. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'apps/patchwork/tests/test_notifications.py')
-rw-r--r--apps/patchwork/tests/test_notifications.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/patchwork/tests/test_notifications.py b/apps/patchwork/tests/test_notifications.py
index df7e3f9..ed35140 100644
--- a/apps/patchwork/tests/test_notifications.py
+++ b/apps/patchwork/tests/test_notifications.py
@@ -103,7 +103,7 @@ class PatchNotificationModelTest(TestCase):
self.assertEqual(PatchChangeNotification.objects.count(), 1)
notification = PatchChangeNotification.objects.all()[0]
self.assertEqual(notification.orig_state, oldstate)
- self.assertTrue(notification.last_modified > orig_timestamp)
+ self.assertTrue(notification.last_modified >= orig_timestamp)
def testProjectNotificationsDisabled(self):
"""Ensure we don't see notifications created when a project is