summaryrefslogtreecommitdiffstats
path: root/tests/unit/test-003-event.py
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2015-02-18 01:00:16 +0100
committerThomas Bruederli <bruederli@kolabsys.com>2015-02-18 01:00:16 +0100
commit6b575791b1579a44aca412346b7b40fa672b0ab9 (patch)
tree2951184a7cbceb276e88ad264c7fc6c531cffd08 /tests/unit/test-003-event.py
parentc8abb4150f7e9c1f80a7098a332561ae92e135a3 (diff)
downloadpykolab-6b575791b1579a44aca412346b7b40fa672b0ab9.tar.gz
Adapt test for iCal import after libkolab (#4618) has been improved
Diffstat (limited to 'tests/unit/test-003-event.py')
-rw-r--r--tests/unit/test-003-event.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/tests/unit/test-003-event.py b/tests/unit/test-003-event.py
index d79d877..c3172f9 100644
--- a/tests/unit/test-003-event.py
+++ b/tests/unit/test-003-event.py
@@ -458,7 +458,7 @@ PRODID:-//Roundcube//Roundcube libcalendaring 1.1-git//Sabre//Sabre VObject
2.1.3//EN
CALSCALE:GREGORIAN
METHOD:REQUEST
- """ + ical_event + "END:VCALENDAR"
+ """ + ical_event + ical_exception + "END:VCALENDAR"
ical = icalendar.Calendar.from_ical(ical_str)
event = event_from_ical(ical.walk('VEVENT')[0], ical_str)
@@ -481,13 +481,11 @@ METHOD:REQUEST
self.assertIsInstance(event.get_exception_dates()[0], datetime.datetime)
self.assertEqual(len(event.get_alarms()), 1)
self.assertEqual(len(event.get_attachments()), 2)
+ self.assertEqual(len(event.get_exceptions()), 1)
- # TODO: load ical_exception with main event
- #self.assertEqual(len(event.get_exceptions()), 1)
-
- exception = event_from_ical(ical_exception)
+ exception = event.get_exceptions()[0]
self.assertIsInstance(exception.get_recurrence_id(), datetime.datetime)
- self.assertEqual(exception.thisandfuture, True)
+ # self.assertEqual(exception.thisandfuture, True)
self.assertEqual(str(exception.get_start()), "2014-06-07 12:00:00+02:00")
def test_018_ical_to_message(self):