diff options
author | Damien Lespiau <damien.lespiau@intel.com> | 2014-11-08 13:25:58 +0000 |
---|---|---|
committer | Jeremy Kerr <jk@ozlabs.org> | 2014-11-10 20:27:28 +0800 |
commit | 8904a7dcaf959da8db4a9a5d92b91a61eed05201 (patch) | |
tree | 3a06642d069587ccc841d10e2f024e777d173278 | |
parent | a5d803a565aea5b655058ff244e9ae8356004963 (diff) | |
download | patchwork-8904a7dcaf959da8db4a9a5d92b91a61eed05201.tar patchwork-8904a7dcaf959da8db4a9a5d92b91a61eed05201.tar.gz |
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>
-rw-r--r-- | apps/patchwork/tests/test_notifications.py | 2 |
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 |