summaryrefslogtreecommitdiffstats
path: root/tests/unit/test-011-itip.py
diff options
context:
space:
mode:
authorAleksander Machniak <machniak@kolabsys.com>2016-09-30 20:00:07 +0200
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2016-09-30 20:00:07 +0200
commitefb60aa451319f372188033e8966dafd27685818 (patch)
treec419ecc482f8b87c0d22180951d4a8b1b481b536 /tests/unit/test-011-itip.py
parent43a5cac5b3ec98344724d1727b5b7fe542bbb592 (diff)
downloadpykolab-efb60aa451319f372188033e8966dafd27685818.tar.gz
T1461: Convert windows timezones into Olson format in iTip
Summary: iCalendar is used to parse iTip data, but it does not support windows tz. Fixes T1461 Reviewers: #pykolab_developers, vanmeeuwen Reviewed By: #pykolab_developers, vanmeeuwen Subscribers: vanmeeuwen Maniphest Tasks: T1461 Differential Revision: https://git.kolab.org/D219
Diffstat (limited to 'tests/unit/test-011-itip.py')
-rw-r--r--tests/unit/test-011-itip.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/unit/test-011-itip.py b/tests/unit/test-011-itip.py
index 38e00b8..173a26e 100644
--- a/tests/unit/test-011-itip.py
+++ b/tests/unit/test-011-itip.py
@@ -286,7 +286,7 @@ METHOD:REQUEST
BEGIN:VEVENT
UID:eea25142-fb1c-4831-a02d-ac9fb4c16b70
DTSTAMP:20140213T125414Z
-DTSTART;TZID=3DEurope/London:20140713T100000
+DTSTART;TZID=3D"W. Europe Standard Time":20140713T100000
DTEND;TZID=3DEurope/London:20140713T140000
SUMMARY:Testing =C3=9Cmlauts
DESCRIPTION:Testing =C3=9Cmlauts
@@ -375,6 +375,11 @@ class TestITip(unittest.TestCase):
self.assertEqual(xml.get_summary(), "Testing Ümlauts")
self.assertEqual(xml.get_location(), "Rue the Genève")
+ # Timezone conversion
+ itips = itip.events_from_message(message_from_string(itip_unicode))
+ xml = itips[0]['xml']
+ self.assertEqual(xml.get_start().tzinfo.__str__(), "Europe/Berlin")
+
def test_002_check_date_conflict(self):
astart = datetime.datetime(2014, 7, 13, 10, 0, 0)
aend = astart + datetime.timedelta(hours=2)