summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2015-02-17 10:29:19 +0100
committerThomas Bruederli <bruederli@kolabsys.com>2015-02-17 10:29:19 +0100
commit073abc3611c52707f4a5fc63ab964f960366a9a6 (patch)
tree5dcb166cb794750dd6fc4fbd0dc415b8c2acf7e5 /tests
parente25e91e5c23621c53e1c0034cf5d3c42e939363e (diff)
downloadpykolab-073abc3611c52707f4a5fc63ab964f960366a9a6.tar.gz
Fix attendee updates on exceptions
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/test-003-event.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/unit/test-003-event.py b/tests/unit/test-003-event.py
index 1d0ad10..d79d877 100644
--- a/tests/unit/test-003-event.py
+++ b/tests/unit/test-003-event.py
@@ -855,16 +855,22 @@ END:VEVENT
jane = event.get_attendee("jane@example.org")
jane.set_participant_status('TENTATIVE')
jack = Attendee("jack@example.org", name="Jack", role='OPT-PARTICIPANT')
+ some = event.set_attendee_participant_status("somebody@else.com", 'ACCEPTED')
# update jane + add jack
event.update_attendees([jane,jack])
self.assertEqual(len(event.get_attendees()), 3)
self.assertEqual(event.get_attendee("jane@example.org").get_participant_status(), kolabformat.PartTentative)
+ self.assertEqual(event.get_attendee("somebody@else.com").get_participant_status(), kolabformat.PartAccepted)
+ # test write + read
+ event = event_from_string(str(event))
exception = event.get_exceptions()[0]
self.assertEqual(len(exception.get_attendees()), 2)
self.assertEqual(event.get_attendee("jane@example.org").get_participant_status(), kolabformat.PartTentative)
self.assertEqual(event.get_attendee("jack@example.org").get_name(), "Jack")
+ self.assertRaises(ValueError, exception.get_attendee, "somebody@else.com") # not addded to exception
+
def _find_prop_in_list(self, diff, name):
for prop in diff: