Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: sitescripts/notifications/test/parser.py

Issue 29322888: Issue 2707 - Remove start/end from notifications (Closed)
Patch Set: Created July 29, 2015, 10:43 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« sitescripts/notifications/parser.py ('K') | « sitescripts/notifications/parser.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sitescripts/notifications/test/parser.py
===================================================================
--- a/sitescripts/notifications/test/parser.py
+++ b/sitescripts/notifications/test/parser.py
@@ -106,5 +106,19 @@
notifications = parser.load_notifications()
self.assertEqual(len(notifications), 0)
+ def test_start_and_end_not_present(self):
+ current_time = datetime.datetime.now()
+ hour_delta = datetime.timedelta(hours=1)
+ start_time = current_time - hour_delta
+ end_time = current_time + hour_delta
+ self.notification_to_load = ("1", """
+start = %s
+end = %s
+""" % (_format_time(start_time), _format_time(end_time)))
+ notifications = parser.load_notifications()
+ self.assertEqual(len(notifications), 1)
+ self.assertNotIn(notifications[0], "start")
+ self.assertNotIn(notifications[0], "end")
+
if __name__ == "__main__":
unittest.main()
« sitescripts/notifications/parser.py ('K') | « sitescripts/notifications/parser.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld