Skip to content

Commit

Permalink
fix(unit tests): Store utcnow before checking versionposted
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkLark86 committed Oct 24, 2023
1 parent 5601304 commit d0bdc39
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/planning/events/events_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,7 @@ def test_planning_item_is_published_with_events(self):
}
],
)
now = utcnow()
get_resource_service("events_post").post(
[
{
Expand All @@ -530,4 +531,4 @@ def test_planning_item_is_published_with_events(self):
planning_item = planning_service.find_one(req=None, _id=planning_id[0])
self.assertEqual(len([planning_item]), 1)
self.assertEqual(planning_item.get("state"), "scheduled")
self.assertEqual(planning_item.get("versionposted"), utcnow())
self.assertEqual(planning_item.get("versionposted"), now)

0 comments on commit d0bdc39

Please sign in to comment.