Skip to content

Commit

Permalink
fix tests (#1844)
Browse files Browse the repository at this point in the history
* fix tests

* changelog
  • Loading branch information
erral authored Nov 20, 2024
1 parent 96d60bf commit 64783c3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 2 additions & 0 deletions news/1844.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Fix tests after #1839 and plone.app.event#411
[erral]
9 changes: 6 additions & 3 deletions src/plone/restapi/tests/test_serializer_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,10 @@ def test_dx_event_with_recurrence_new_version(self):
tomorrow_str = tomorrow.strftime("%Y-%m-%d")
ot = OccurrenceTraverser(self.event, self.request)
ocurrence = ot.publishTraverse(self.request, tomorrow_str)
self.request.form["metadata_fields"] = ["start"]
summary = getMultiAdapter((ocurrence, self.request), ISerializeToJsonSummary)()

self.assertEqual(summary["start"], tomorrow_str)
self.assertEqual(summary["Title"], ocurrence.Title())
self.assertEqual(
datetime.fromisoformat(summary["start"]).date().isoformat(),
tomorrow.date().isoformat(),
)
self.assertEqual(summary["title"], ocurrence.Title())

0 comments on commit 64783c3

Please sign in to comment.