From f13f27584ee67d40b7972e23c531f6869ba9a8c4 Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Wed, 20 Nov 2024 13:54:12 +0100 Subject: [PATCH] fix tests --- src/plone/restapi/tests/test_serializer_summary.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/plone/restapi/tests/test_serializer_summary.py b/src/plone/restapi/tests/test_serializer_summary.py index 7945792419..9a7b7db455 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())