summaryrefslogtreecommitdiffstats
path: root/tests/unit/test-011-itip.py
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2015-02-17 20:50:22 +0100
committerThomas Bruederli <bruederli@kolabsys.com>2015-02-17 20:51:39 +0100
commit94cd4fab8e9e80111fc3c07636ab0fae4af4c49d (patch)
tree2d02cbd7e6c8564f057ee0a2ddcc7cd98dc2faa8 /tests/unit/test-011-itip.py
parentf2e42d9610be40b21fe2de3f75742da61a96f5a2 (diff)
downloadpykolab-94cd4fab8e9e80111fc3c07636ab0fae4af4c49d.tar.gz
Consider transparency and 'cancelled' status for recurrence exceptions
Diffstat (limited to 'tests/unit/test-011-itip.py')
-rw-r--r--tests/unit/test-011-itip.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/unit/test-011-itip.py b/tests/unit/test-011-itip.py
index dafa645..80b9df6 100644
--- a/tests/unit/test-011-itip.py
+++ b/tests/unit/test-011-itip.py
@@ -461,13 +461,21 @@ class TestITip(unittest.TestCase):
event5.set_start(datetime.datetime(2012,7,9, 10,0,0, tzinfo=pytz.timezone("Europe/London")))
event5.set_end(datetime.datetime(2012,7,9, 11,0,0, tzinfo=pytz.timezone("Europe/London")))
- exception = Event(from_string=str(event5))
+ event_xml = str(event5)
+ exception = Event(from_string=event_xml)
exception.set_start(datetime.datetime(2012,7,13, 14,0,0, tzinfo=pytz.timezone("Europe/London")))
exception.set_end(datetime.datetime(2012,7,13, 16,0,0, tzinfo=pytz.timezone("Europe/London")))
exception.set_recurrence_id(datetime.datetime(2012,7,13, 10,0,0, tzinfo=pytz.timezone("Europe/London")), False)
event5.add_exception(exception)
self.assertFalse(itip.check_event_conflict(event5, itip_event), "No conflict with exception date")
+ exception = Event(from_string=event_xml)
+ exception.set_start(datetime.datetime(2012,7,13, 10,0,0, tzinfo=pytz.timezone("Europe/London")))
+ exception.set_end(datetime.datetime(2012,7,13, 11,0,0, tzinfo=pytz.timezone("Europe/London")))
+ exception.set_status('CANCELLED')
+ exception.set_recurrence_id(datetime.datetime(2012,7,13, 10,0,0, tzinfo=pytz.timezone("Europe/London")), False)
+ event5.add_exception(exception)
+ self.assertFalse(itip.check_event_conflict(event5, itip_event), "No conflict with cancelled exception")
def test_003_send_reply(self):
itip_events = itip.events_from_message(message_from_string(itip_non_multipart))