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())