From d87e504c4dd13dd9235499f71d607de64b6d4064 Mon Sep 17 00:00:00 2001 From: Jennifer Richards Date: Tue, 8 Aug 2023 15:05:39 -0300 Subject: [PATCH] test: Use correct time zone for test_statement_doc_view (#6064) --- ietf/doc/tests_statement.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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()