Skip to content

Commit 379ed8b

Browse files
committed
test code
1 parent 2eb9604 commit 379ed8b

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

tests/test_caldav.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2477,6 +2477,21 @@ def testTodoDatesearch(self):
24772477
# TODO: prod the caldav server implementers about the RFC
24782478
# breakages.
24792479

2480+
def testSearchWithoutCompType(self):
2481+
"""
2482+
Test for https://github.com/python-caldav/caldav/issues/539
2483+
"""
2484+
self.skip_on_compatibility_flag("search_needs_comptype")
2485+
self.skip_on_compatibility_flag("search_always_needs_comptype")
2486+
self.skip_on_compatibility_flag("no_todo")
2487+
self.skip_on_compatibility_flag("no_events_and_tasks_on_same_calendar")
2488+
cal = self._fixCalendar()
2489+
cal.save_todo(todo)
2490+
cal.save_event(ev1)
2491+
objects = cal.search()
2492+
assert len(objects) == 2
2493+
assert set([str(type(x)) for x in objects]) == {"Todo", "Event"}
2494+
24802495
def testTodoCompletion(self):
24812496
"""
24822497
Will check that todo-items can be completed and deleted

0 commit comments

Comments
 (0)