diff --git a/ietf/doc/tests_statement.py b/ietf/doc/tests_statement.py index 48ab0da7d8..4234a18c81 100644 --- a/ietf/doc/tests_statement.py +++ b/ietf/doc/tests_statement.py @@ -5,6 +5,7 @@ from pyquery import PyQuery from pathlib import Path +from zoneinfo import ZoneInfo from django.conf import settings from django.core.files.uploadedfile import SimpleUploadedFile @@ -68,7 +69,10 @@ def test_statement_doc_view(self): self.assertEqual(q("#statement-type").text(), "IAB Statement") self.assertIn("has some text", q(".card-body").text()) published = doc.docevent_set.filter(type="published_statement").last().time - self.assertIn(published.date().isoformat(), q("#published").text()) + self.assertIn( + published.astimezone(ZoneInfo(settings.TIME_ZONE)).date().isoformat(), + q("#published").text(), + ) doc.set_state(State.objects.get(type_id="statement", slug="replaced")) doc2 = StatementFactory()