summaryrefslogtreecommitdiffstats
path: root/tests/unit/test-003-event.py
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2015-03-02 10:36:13 -0500
committerThomas Bruederli <bruederli@kolabsys.com>2015-03-02 10:36:13 -0500
commit14c14b74411d6a32d5948cdbdc09eaf1ce8b7c5a (patch)
tree68044823b984fe2bb6062efc456dcdc54f0931d1 /tests/unit/test-003-event.py
parent3cc3391170e54fb3e4bf477562bc2ef4bf8885c3 (diff)
downloadpykolab-14c14b74411d6a32d5948cdbdc09eaf1ce8b7c5a.tar.gz
Make sure stored recurrence-id properties are returned as the correct date/datetime type (#4752)
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 5798101..f039ca1 100644
--- a/tests/unit/test-003-event.py
+++ b/tests/unit/test-003-event.py
@@ -814,6 +814,14 @@ END:VEVENT
self.assertIsInstance(occurrence, Event)
self.assertEqual(str(occurrence.get_recurrence_id()), "2014-08-15 10:00:00+01:00")
+ # set invalid date-only recurrence-id
+ exception.set_recurrence_id(datetime.date(2014,8,16))
+ event.add_exception(exception)
+
+ inst = event.get_next_instance(_recurrence_id);
+ self.assertIsInstance(inst, Event)
+ self.assertIsInstance(inst.get_recurrence_id(), datetime.datetime)
+
def test_023_load_from_message(self):
event = event_from_message(event_from_ical(ical_event).to_message())
event.set_sequence(3)