Skip to content

Commit 8a0ea4e

Browse files
Helper2020seanlip
andauthored
Fixed story_services_test.py (oppia#22228)
Co-authored-by: Sean Lip <sean@seanlip.org>
1 parent 73c3945 commit 8a0ea4e

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

core/domain/story_services_test.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -365,17 +365,26 @@ def test_update_story_node_properties(self) -> None:
365365
self.assertEqual(
366366
story.story_contents.nodes[1].
367367
planned_publication_date_msecs, (
368-
datetime.datetime(2023, 1, 2, 0, 0).timestamp() * 1000),
368+
datetime.datetime(
369+
2023, 1, 2, 0, 0,
370+
tzinfo=datetime.timezone.utc).timestamp() * 1000
371+
),
369372
msg='Incorrect planned publication date in milliseconds received.')
370373
self.assertEqual(
371374
story.story_contents.nodes[1].
372375
first_publication_date_msecs, (
373-
datetime.datetime(2023, 1, 1, 0, 0).timestamp() * 1000),
376+
datetime.datetime(
377+
2023, 1, 1, 0, 0,
378+
tzinfo=datetime.timezone.utc).timestamp() * 1000
379+
),
374380
msg='Incorrect first publication date in milliseconds received.')
375381
self.assertEqual(
376382
story.story_contents.nodes[1].
377383
last_modified_msecs, (
378-
datetime.datetime(2023, 1, 1, 0, 0).timestamp() * 1000),
384+
datetime.datetime(
385+
2023, 1, 1, 0, 0,
386+
tzinfo=datetime.timezone.utc).timestamp() * 1000
387+
),
379388
msg='Incorrect last modified date in milliseconds received.')
380389
story_summary = story_fetchers.get_story_summary_by_id(self.STORY_ID)
381390
self.assertEqual(story_summary.node_titles, ['Title 1', 'Title 2'])

0 commit comments

Comments
 (0)