Skip to content

Commit b1eaeab

Browse files
committed
FIXUP: Fix timezone
1 parent 7728dff commit b1eaeab

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ynr/apps/people/tests/test_person_models.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from candidates.tests.helpers import TmpMediaRootMixin
88
from candidates.tests.uk_examples import UK2015ExamplesMixin
99
from django.contrib.auth import get_user_model
10+
from django.utils import timezone
1011
from django_webtest import WebTest
1112
from moderation_queue.models import QueuedImage
1213
from moderation_queue.tests.paths import EXAMPLE_IMAGE_FILENAME
@@ -76,7 +77,7 @@ def test_person_image_modified_timestamp(self):
7677
"user_notes": "A photo of Tessa Jowell",
7778
},
7879
)
79-
modified = pi.modified
80+
modified = timezone.localtime(pi.modified)
8081
response = self.app.get(f"/person/{person.id}", user=self.user)
8182
self.assertIn(
8283
f"This photo was uploaded on {modified.strftime('%-d %B %Y %H:%M')}.",

0 commit comments

Comments
 (0)