Skip to content

Commit 0afde3b

Browse files
committed
freeze time in test that assumed it was always september
1 parent 941f8ea commit 0afde3b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

manage_breast_screening/mammograms/tests/presenters/test_medical_information_presenter.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from datetime import date
2+
13
import pytest
24

35
from manage_breast_screening.mammograms.presenters.medical_information_presenter import (
@@ -46,7 +48,9 @@ def test_returns_symptoms(self, area, expected_location):
4648
),
4749
]
4850

49-
def test_formats_investigation_and_specific_date(self):
51+
def test_formats_investigation_and_specific_date(self, time_machine):
52+
time_machine.move_to(date(2025, 9, 1))
53+
5054
symptom = SymptomFactory.create(
5155
lump=True,
5256
when_started=RelativeDateChoices.SINCE_A_SPECIFIC_DATE,

0 commit comments

Comments
 (0)