Skip to content

Commit

Permalink
Test code for category search issue (ref Kozea#1280 and Kozea#1125)
Browse files Browse the repository at this point in the history
  • Loading branch information
tobixen authored and Unrud committed Mar 5, 2023
1 parent 7b98a00 commit 7d4a0fe
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions radicale/tests/static/event1.ics
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ LAST-MODIFIED:20130902T150158Z
DTSTAMP:20130902T150158Z
UID:event1
SUMMARY:Event
CATEGORIES:some_category1,another_category2
ORGANIZER:mailto:[email protected]
ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=TENTATIVE;CN=Jane Doe:MAILTO:[email protected]
ATTENDEE;ROLE=REQ-PARTICIPANT;DELEGATED-FROM="MAILTO:[email protected]";PARTSTAT=ACCEPTED;CN=John Doe:MAILTO:[email protected]
Expand Down
16 changes: 16 additions & 0 deletions radicale/tests/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -916,6 +916,22 @@ def test_text_match_filter(self) -> None:
<C:text-match>event</C:text-match>
</C:prop-filter>
</C:comp-filter>
</C:comp-filter>"""])
assert "/calendar.ics/event1.ics" in self._test_filter(["""\
<C:comp-filter name="VCALENDAR">
<C:comp-filter name="VEVENT">
<C:prop-filter name="CATEGORIES">
<C:text-match>some_category1</C:text-match>
</C:prop-filter>
</C:comp-filter>
</C:comp-filter>"""])
assert "/calendar.ics/event1.ics" in self._test_filter(["""\
<C:comp-filter name="VCALENDAR">
<C:comp-filter name="VEVENT">
<C:prop-filter name="CATEGORIES">
<C:text-match collation="i;octet">some_category1</C:text-match>
</C:prop-filter>
</C:comp-filter>
</C:comp-filter>"""])
assert "/calendar.ics/event1.ics" not in self._test_filter(["""\
<C:comp-filter name="VCALENDAR">
Expand Down

0 comments on commit 7d4a0fe

Please sign in to comment.