diff --git a/news/1844.bugfix b/news/1844.bugfix new file mode 100644 index 000000000..2cee040a3 --- /dev/null +++ b/news/1844.bugfix @@ -0,0 +1,2 @@ +Fix tests after #1839 and plone.app.event#411 +[erral] diff --git a/src/plone/restapi/tests/test_serializer_summary.py b/src/plone/restapi/tests/test_serializer_summary.py index 794579241..9a7b7db45 100644 --- a/src/plone/restapi/tests/test_serializer_summary.py +++ b/src/plone/restapi/tests/test_serializer_summary.py @@ -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())