Skip to content

Commit

Permalink
Fix test that forgot to keep time mocked
Browse files Browse the repository at this point in the history
This fixes a test that would fail if run on any day but the day it was
written. Let that me a lesson to me to not mock time to the current
date. =)
  • Loading branch information
DavidCain committed Apr 6, 2024
1 parent 5e2301b commit 10e39a7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ws/tests/views/test_participant.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,15 +434,15 @@ def test_bygone_feedback(self):
showed_up=False,
comments="Slept through their alarm, did not answer phone calls",
)
with freeze_time("2024-01-27 12:00 UTC"):
with freeze_time("2024-01-28T12:00-05:00"):
factories.FeedbackFactory.create(
participant=self.participant,
comments="Right on time! Figured out their alarm.",
)

response = self.client.get(
f"/participants/{self.participant.pk}/?show_feedback=1"
)
response = self.client.get(
f"/participants/{self.participant.pk}/?show_feedback=1"
)
soup = BeautifulSoup(response.content, "html.parser")

self.assertEqual(
Expand Down

0 comments on commit 10e39a7

Please sign in to comment.