Skip to content

Commit

Permalink
Fixed tests to work with future icalendar.
Browse files Browse the repository at this point in the history
There ``;VALUE=DATE-TIME`` is not included because it is already the default.
See collective/icalendar#450
  • Loading branch information
mauritsvanrees committed Nov 2, 2022
1 parent bd412c8 commit 92383d4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions 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]
5 changes: 5 additions & 0 deletions plone/app/event/tests/test_icalendar.py
Expand Up @@ -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
)
Expand Down

0 comments on commit 92383d4

Please sign in to comment.