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

Side by Side Diff: sitescripts/notifications/test/parser.py

Issue 29323360: Noissue - Fix notification range test (Closed)
Patch Set: Noissue - Fix notification range test Created Aug. 7, 2015, 6:37 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # coding: utf-8 1 # coding: utf-8
2 2
3 # This file is part of the Adblock Plus web scripts, 3 # This file is part of the Adblock Plus web scripts,
4 # Copyright (C) 2006-2015 Eyeo GmbH 4 # Copyright (C) 2006-2015 Eyeo GmbH
5 # 5 #
6 # Adblock Plus is free software: you can redistribute it and/or modify 6 # Adblock Plus is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License version 3 as 7 # it under the terms of the GNU General Public License version 3 as
8 # published by the Free Software Foundation. 8 # published by the Free Software Foundation.
9 # 9 #
10 # Adblock Plus is distributed in the hope that it will be useful, 10 # Adblock Plus is distributed in the hope that it will be useful,
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 current_time = datetime.datetime.now() 110 current_time = datetime.datetime.now()
111 hour_delta = datetime.timedelta(hours=1) 111 hour_delta = datetime.timedelta(hours=1)
112 start_time = current_time - hour_delta 112 start_time = current_time - hour_delta
113 end_time = current_time + hour_delta 113 end_time = current_time + hour_delta
114 self.notification_to_load = ("1", """ 114 self.notification_to_load = ("1", """
115 start = %s 115 start = %s
116 end = %s 116 end = %s
117 """ % (_format_time(start_time), _format_time(end_time))) 117 """ % (_format_time(start_time), _format_time(end_time)))
118 notifications = parser.load_notifications() 118 notifications = parser.load_notifications()
119 self.assertEqual(len(notifications), 1) 119 self.assertEqual(len(notifications), 1)
120 self.assertNotIn(notifications[0], "start") 120 self.assertNotIn("start", notifications[0])
121 self.assertNotIn(notifications[0], "end") 121 self.assertNotIn("end", notifications[0])
122 122
123 if __name__ == "__main__": 123 if __name__ == "__main__":
124 unittest.main() 124 unittest.main()
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld