Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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