Index: sitescripts/notifications/test/parser.py |
=================================================================== |
--- a/sitescripts/notifications/test/parser.py |
+++ b/sitescripts/notifications/test/parser.py |
@@ -69,7 +69,8 @@ |
inactive = True |
""") |
notifications = parser.load_notifications() |
- self.assertEqual(len(notifications), 0) |
+ self.assertEqual(len(notifications), 1) |
+ self.assertTrue(notifications[0]["inactive"]) |
def test_in_range(self): |
current_time = datetime.datetime.now() |
@@ -83,6 +84,7 @@ |
notifications = parser.load_notifications() |
self.assertEqual(len(notifications), 1) |
self.assertEqual(notifications[0]["id"], "1") |
+ self.assertNotIn("inactive", notifications[0]) |
def test_after_range(self): |
current_time = datetime.datetime.now() |
@@ -93,7 +95,8 @@ |
end = %s |
""" % (_format_time(start_time), _format_time(end_time))) |
notifications = parser.load_notifications() |
- self.assertEqual(len(notifications), 0) |
+ self.assertEqual(len(notifications), 1) |
+ self.assertTrue(notifications[0]["inactive"]) |
def test_before_range(self): |
current_time = datetime.datetime.now() |
@@ -104,7 +107,8 @@ |
end = %s |
""" % (_format_time(start_time), _format_time(end_time))) |
notifications = parser.load_notifications() |
- self.assertEqual(len(notifications), 0) |
+ self.assertEqual(len(notifications), 1) |
+ self.assertTrue(notifications[0]["inactive"]) |
def test_start_and_end_not_present(self): |
current_time = datetime.datetime.now() |