summaryrefslogtreecommitdiffstats
path: root/tests/unit/test-016-todo.py
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2015-02-10 11:49:06 +0100
committerThomas Bruederli <bruederli@kolabsys.com>2015-02-10 11:49:06 +0100
commitc41acdb7336bbd38c8721a0ecce2fbabe03502ed (patch)
treeb145bec471f2552ad138a87b064e71ff30004a79 /tests/unit/test-016-todo.py
parenta214f29290f4d5e5a2d62a8a549679c8a4c0fe51 (diff)
downloadpykolab-c41acdb7336bbd38c8721a0ecce2fbabe03502ed.tar.gz
Import RRULE properties from iCal VTODO objects
Diffstat (limited to 'tests/unit/test-016-todo.py')
-rw-r--r--tests/unit/test-016-todo.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/unit/test-016-todo.py b/tests/unit/test-016-todo.py
index dcb89c5..91562c3 100644
--- a/tests/unit/test-016-todo.py
+++ b/tests/unit/test-016-todo.py
@@ -26,6 +26,7 @@ CREATED;VALUE=DATE-TIME:20140731T100704Z
LAST-MODIFIED;VALUE=DATE-TIME:20140820T101333Z
DTSTART;VALUE=DATE-TIME;TZID=Europe/London:20140818T180000
DUE;VALUE=DATE-TIME;TZID=Europe/London:20140822T133000
+RRULE:FREQ=MONTHLY;INTERVAL=2;COUNT=10;BYDAY=2MO,-1WE;UNTIL=20150220T180000Z
SUMMARY:Sample Task assignment
DESCRIPTION:Summary: Sample Task assignment\\nDue Date: 08/11/14\\nDue Time:
\\n13:30 AM
@@ -241,6 +242,13 @@ METHOD:REQUEST
self.assertEqual(todo.get_percentcomplete(), 20)
#print str(todo)
+ data = todo.to_dict()
+ self.assertIsInstance(data['rrule'], dict)
+ self.assertEqual(data['rrule']['freq'], 'MONTHLY')
+ self.assertEqual(data['rrule']['interval'], 2)
+ self.assertEqual(data['rrule']['byday'], '2MO,-1WE')
+ self.assertIsInstance(data['rrule']['until'], datetime.datetime)
+
def test_021_as_string_itip(self):
self.todo.set_summary("test")
self.todo.set_start(datetime.datetime(2014, 9, 20, 11, 00, 00, tzinfo=pytz.timezone("Europe/London")))