From 7d4a0fe70eec21b8e410df1a92d4ae6bd2e94a7b Mon Sep 17 00:00:00 2001 From: Tobias Brox Date: Fri, 27 Jan 2023 19:07:50 +0100 Subject: [PATCH] Test code for category search issue (ref https://github.com/Kozea/Radicale/issues/1280 and https://github.com/Kozea/Radicale/issues/1125) --- radicale/tests/static/event1.ics | 1 + radicale/tests/test_base.py | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/radicale/tests/static/event1.ics b/radicale/tests/static/event1.ics index bc04d80a..4e669175 100644 --- a/radicale/tests/static/event1.ics +++ b/radicale/tests/static/event1.ics @@ -25,6 +25,7 @@ LAST-MODIFIED:20130902T150158Z DTSTAMP:20130902T150158Z UID:event1 SUMMARY:Event +CATEGORIES:some_category1,another_category2 ORGANIZER:mailto:unclesam@example.com ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=TENTATIVE;CN=Jane Doe:MAILTO:janedoe@example.com ATTENDEE;ROLE=REQ-PARTICIPANT;DELEGATED-FROM="MAILTO:bob@host.com";PARTSTAT=ACCEPTED;CN=John Doe:MAILTO:johndoe@example.com diff --git a/radicale/tests/test_base.py b/radicale/tests/test_base.py index 5ea37bfb..6bd4b2f8 100644 --- a/radicale/tests/test_base.py +++ b/radicale/tests/test_base.py @@ -916,6 +916,22 @@ permissions: RrWw""") event +"""]) + assert "/calendar.ics/event1.ics" in self._test_filter(["""\ + + + + some_category1 + + +"""]) + assert "/calendar.ics/event1.ics" in self._test_filter(["""\ + + + + some_category1 + + """]) assert "/calendar.ics/event1.ics" not in self._test_filter(["""\