From 62054ab7c0cab947193d1aa169cc700c618db799 Mon Sep 17 00:00:00 2001 From: Julien Constant Date: Sun, 9 Apr 2023 00:32:56 +0200 Subject: [PATCH] Fix failing test when 2 user are merged --- rootplace/tests.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rootplace/tests.py b/rootplace/tests.py index b6b957db..f1bb174f 100644 --- a/rootplace/tests.py +++ b/rootplace/tests.py @@ -144,11 +144,12 @@ class MergeUserTest(TestCase): self.assertTrue(self.to_keep.is_subscribed) # to_keep had 5 months of subscription remaining and received # 5 more months from to_delete, so he should be subscribed for 10 months - self.assertEqual( + self.assertAlmostEqual( today + timedelta(10 * 30), self.to_keep.subscriptions.order_by("subscription_end") .last() .subscription_end, + delta=timedelta(1), ) def test_godfathers(self):