Skip to content

Commit

Permalink
fix expires_at test test (#664)
Browse files Browse the repository at this point in the history
  • Loading branch information
Porcupine1 committed Apr 17, 2024
1 parent d199a7e commit 2ee4b7e
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions backend/tests/clubs/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1688,14 +1688,12 @@ def test_send_invite_with_acceptance_email(self):
expiry_date = now + timezone.timedelta(days=5)

# Compare the expiry dates excluding microseconds
self.assertEqual(
invite1.expires_at.replace(microsecond=0),
expiry_date.replace(microsecond=0),
self.assertLessEqual(
abs(invite1.expires_at - expiry_date), timezone.timedelta(minutes=5)
)

self.assertEqual(
invite2.expires_at.replace(microsecond=0),
expiry_date.replace(microsecond=0),
self.assertLessEqual(
abs(invite2.expires_at - expiry_date), timezone.timedelta(minutes=5)
)

# Check that applicants not accepted are not invited
Expand Down

0 comments on commit 2ee4b7e

Please sign in to comment.