Skip to content

Commit

Permalink
unittest description
Browse files Browse the repository at this point in the history
Add test messages for Event.__str__ tests.
  • Loading branch information
dlichtistw committed Oct 2, 2018
1 parent 0018856 commit dff4e35
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions test/test_icalevents.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,12 @@ def test_event_str(self):
evs = icalevents.events(file=ical, start=start, end=end)

e1 = evs[0]
self.assertIsNotNone(search(r"ended", str(e1.copy_to(n - relativedelta(days=5) + m))))
self.assertIsNotNone(search(r"today", str(e1.copy_to(n - relativedelta(days=1) + m))))
self.assertIsNotNone(search(r"days left", str(e1.copy_to(n + relativedelta(days=3) + m))))
self.assertIsNotNone(search(r"ended", str(e1.copy_to(n - relativedelta(days=5) + m))), "stringify past event")
self.assertIsNotNone(search(r"today", str(e1.copy_to(n - relativedelta(days=1) + m))), "stringify ongoing event")
self.assertIsNotNone(search(r"days left", str(e1.copy_to(n + relativedelta(days=3) + m))), "stringify future event")

e2 = evs[1]
self.assertIsNotNone(search(r"ended", str(e2.copy_to(n - relativedelta(hours=5)))))
self.assertIsNotNone(search(r"now", str(e2.copy_to(n - relativedelta(hours=1)))))
self.assertIsNotNone(search(r"hours left", str(e2.copy_to(n + relativedelta(hours=3)))))
self.assertIsNotNone(search(r"days left", str(e2.copy_to(n + relativedelta(days=3)))))
self.assertIsNotNone(search(r"ended", str(e2.copy_to(n - relativedelta(hours=5)))), "stringify past event")
self.assertIsNotNone(search(r"now", str(e2.copy_to(n - relativedelta(hours=1)))), "stringify ongoing event")
self.assertIsNotNone(search(r"hours left", str(e2.copy_to(n + relativedelta(hours=3)))), "stringify future event")
self.assertIsNotNone(search(r"days left", str(e2.copy_to(n + relativedelta(days=3)))), "stringify future event")

0 comments on commit dff4e35

Please sign in to comment.