Skip to content

Commit

Permalink
test: Use correct time zone for test_statement_doc_view (#6064)
Browse files Browse the repository at this point in the history
  • Loading branch information
jennifer-richards authored Aug 8, 2023
1 parent b574a6e commit d87e504
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ietf/doc/tests_statement.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit d87e504

Please sign in to comment.