summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2014-08-07 07:56:47 (GMT)
committerThomas Bruederli <bruederli@kolabsys.com>2014-08-07 07:56:47 (GMT)
commit11afdf333b00ee4327de840d634e41ea83c91303 (patch)
tree44ed3fb3cd2c63a75dfb689609ae3c7132da40a9
parent8f38b9049400ab9d65e39e7b1e389a0aee5ec3f5 (diff)
downloadlibkolabxml-11afdf333b00ee4327de840d634e41ea83c91303.tar.gz
Fix delegated test case (syntax is important)
-rw-r--r--src/python/test.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/python/test.py b/src/python/test.py
index 1fae8bb..df3bc83 100644
--- a/src/python/test.py
+++ b/src/python/test.py
@@ -45,10 +45,15 @@ class TestKolabformat(unittest.TestCase):
xml = kolabformat.writeEvent(e)
e1 = kolabformat.readEvent(xml, False)
- print xml
+ # print xml
- self.assertEqual(len(e1.attendees()[0].delegatedTo()), 1)
- self.assertEqual(len(e1.attendees()[0].delegatedFrom()), 1)
+ attendees_ = e1.attendees()
+ self.assertEqual(len(attendees_), 2)
+ self.assertEqual(len(attendees_[0].delegatedTo()), 1)
+ self.assertEqual(len(attendees_[1].delegatedFrom()), 1)
+
+ delegatees = attendees_[0].delegatedTo()
+ self.assertEqual(delegatees[0].email(), "jane@doe.org")
if __name__ == '__main__':