summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2014-07-10 04:35:36 -0400
committerThomas Bruederli <bruederli@kolabsys.com>2014-07-10 04:35:36 -0400
commit214bde4656f3e3a10096ba54dfa2704f4e8de719 (patch)
treef3e295f00a948cbe65b2e4f74616846d7ef6b439 /tests
parentd1f4cc6e05eea2f7d3b9e0a92ab0a2c5d10e926f (diff)
downloadpykolab-214bde4656f3e3a10096ba54dfa2704f4e8de719.tar.gz
New function to get a localized string for iCal participant status
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/test-002-attendee.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/unit/test-002-attendee.py b/tests/unit/test-002-attendee.py
index 9da93c7..8bcee3c 100644
--- a/tests/unit/test-002-attendee.py
+++ b/tests/unit/test-002-attendee.py
@@ -1,7 +1,9 @@
import datetime
import unittest
+import kolabformat
from pykolab.xml import Attendee
+from pykolab.xml import participant_status_label
class TestEventXML(unittest.TestCase):
attendee = Attendee("jane@doe.org")
@@ -101,5 +103,10 @@ class TestEventXML(unittest.TestCase):
self.assertEqual([k for k,v in self.attendee.cutype_map.iteritems() if v == 2][0], "INDIVIDUAL")
self.assertEqual([k for k,v in self.attendee.cutype_map.iteritems() if v == 3][0], "RESOURCE")
+ def test_018_partstat_label(self):
+ self.assertEqual(participant_status_label('NEEDS-ACTION'), "Needs Action")
+ self.assertEqual(participant_status_label(kolabformat.PartTentative), "Tentatively Accepted")
+ self.assertEqual(participant_status_label('UNKNOWN'), "UNKNOWN")
+
if __name__ == '__main__':
unittest.main()