summaryrefslogtreecommitdiffstats
path: root/tests/unit/test-003-event.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/test-003-event.py')
-rw-r--r--tests/unit/test-003-event.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/unit/test-003-event.py b/tests/unit/test-003-event.py
index 3f9083e..429e5bc 100644
--- a/tests/unit/test-003-event.py
+++ b/tests/unit/test-003-event.py
@@ -190,6 +190,14 @@ END:VCALENDAR
self.assertEqual(self.event.get_next_occurence(last_date), None)
+ # check infinite recurrence
+ rrule = kolabformat.RecurrenceRule()
+ rrule.setFrequency(kolabformat.RecurrenceRule.Monthly)
+ self.event.set_recurrence(rrule);
+
+ self.assertEqual(self.event.get_last_occurrence(), None)
+ self.assertIsInstance(self.event.get_last_occurrence(force=True), datetime.datetime)
+
# check get_next_instance() which returns a clone of the base event
next_instance = self.event.get_next_instance(next_date)
self.assertIsInstance(next_instance, Event)