summaryrefslogtreecommitdiffstats
path: root/tests/unit/test-016-todo.py
diff options
context:
space:
mode:
authorAleksander Machniak <machniak@kolabsys.com>2016-05-04 15:53:48 +0200
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2016-05-04 15:53:48 +0200
commitc204eaaa2c9a006432fe00489a352833143db01d (patch)
tree18860f2e335b9a98d34f404d5c4b81d22f2ce222 /tests/unit/test-016-todo.py
parent4a24e0cc403321713ee1201ade9d36956da1c060 (diff)
downloadpykolab-c204eaaa2c9a006432fe00489a352833143db01d.tar.gz
CS fixes according to PEP8 (ignored mostly line-length errors only)
Summary: . Reviewers: #pykolab_developers Differential Revision: https://git.kolab.org/D134
Diffstat (limited to 'tests/unit/test-016-todo.py')
-rw-r--r--tests/unit/test-016-todo.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/tests/unit/test-016-todo.py b/tests/unit/test-016-todo.py
index b94d12d..4760399 100644
--- a/tests/unit/test-016-todo.py
+++ b/tests/unit/test-016-todo.py
@@ -188,6 +188,7 @@ Due Time: 13:30 AM</text>
</icalendar>
"""
+
class TestTodoXML(unittest.TestCase):
todo = Todo()
@@ -198,7 +199,7 @@ class TestTodoXML(unittest.TestCase):
if (type(_value)) == _type:
return True
else:
- raise AssertionError, "%s != %s" % (type(_value), _type)
+ raise AssertionError("%s != %s" % (type(_value), _type))
def test_001_minimal(self):
self.todo.set_summary("test")
@@ -227,7 +228,6 @@ class TestTodoXML(unittest.TestCase):
self.assertEqual(todo.get_status(True), "IN-PROCESS")
self.assertEqual(todo.get_related_to(), "9F3E68BED4A94DA2A51EE589F7FDC6C8-A4BF5BBB9FEAA271")
-
def test_020_load_from_ical(self):
ical_str = """BEGIN:VCALENDAR
VERSION:2.0
@@ -239,12 +239,12 @@ METHOD:REQUEST
ical = icalendar.Calendar.from_ical(ical_str)
vtodo = ical.walk('VTODO')[0]
- #print vtodo
+ # print vtodo
todo = todo_from_ical(ical.walk('VTODO')[0].to_ical())
self.assertEqual(todo.get_summary(), "Sample Task assignment")
self.assertIsInstance(todo.get_start(), datetime.datetime)
self.assertEqual(todo.get_percentcomplete(), 20)
- #print str(todo)
+ # print str(todo)
data = todo.to_dict()
self.assertIsInstance(data['rrule'], dict)
@@ -271,7 +271,6 @@ METHOD:REQUEST
self.assertIsInstance(vtodo['due'].dt, datetime.datetime)
self.assertIsInstance(vtodo['dtstamp'].dt, datetime.datetime)
-
def test_022_ical_with_attachment(self):
todo = todo_from_ical(ical_todo_attachment)
@@ -299,6 +298,5 @@ METHOD:REQUEST
self.assertEqual(len(data['alarm']), 1)
self.assertEqual(data['alarm'][0]['action'], 'DISPLAY')
-
if __name__ == '__main__':
- unittest.main() \ No newline at end of file
+ unittest.main()