From 92383d45e361842cb84353ab7f970fce7eb3179d Mon Sep 17 00:00:00 2001 From: Maurits van Rees Date: Wed, 2 Nov 2022 10:18:38 +0100 Subject: [PATCH] Fixed tests to work with future icalendar. There ``;VALUE=DATE-TIME`` is not included because it is already the default. See https://github.com/collective/icalendar/pull/450 --- news/450.bugfix | 2 ++ plone/app/event/tests/test_icalendar.py | 5 +++++ 2 files changed, 7 insertions(+) create mode 100644 news/450.bugfix diff --git a/news/450.bugfix b/news/450.bugfix new file mode 100644 index 000000000..fb7318468 --- /dev/null +++ b/news/450.bugfix @@ -0,0 +1,2 @@ +Fixed tests to work with future icalendar, where ``;VALUE=DATE-TIME`` is not included because it is already the default. +[maurits] diff --git a/plone/app/event/tests/test_icalendar.py b/plone/app/event/tests/test_icalendar.py index 94aa840ff..87269c0c0 100644 --- a/plone/app/event/tests/test_icalendar.py +++ b/plone/app/event/tests/test_icalendar.py @@ -31,6 +31,11 @@ def traverser(self, context, request): def checkOrder(self, text, *order): for item in order: position = text.find(item) + if position == -1: + # ;VALUE=DATE-TIME is the default so it is optional. + # icalendar will remove it in a future release. + # See https://github.com/collective/icalendar/pull/450 + position = text.find(item.replace(";VALUE=DATE-TIME", "")) self.assertTrue( position >= 0, 'menu item "%s" missing or out of order' % item )