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

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

Issue 29500676: Issue 5456 - Add support to specify urlFilters in the notification repository (Closed)
Patch Set: Use assert instead of assertEqual Created Sept. 21, 2017, 10:09 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
« no previous file with comments | « 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
diff --git a/sitescripts/notifications/test/parser.py b/sitescripts/notifications/test/parser.py
index e5b5e37f7025779f93e1098c3d2e2f8f6c4aa8de..c020a2c5f12e316597fbd2b87484392c317b322a 100644
--- a/sitescripts/notifications/test/parser.py
+++ b/sitescripts/notifications/test/parser.py
@@ -154,6 +154,19 @@ end = %s
self.assertEqual(notifications[2]['severity'], 'normal')
self.assertEqual(notifications[3]['severity'], 'relentless')
+ def test_urls(self):
+ self.notification_to_load = [
+ ('1', '\nurls = adblockplus.org\n'),
+ ('1', '\nurls = adblockplus.org eyeo.com\n'),
+ ]
+ notifications = parser.load_notifications()
+
+ assert len(notifications) == 2
+ assert notifications[0]['urlFilters'] == ['ADBLOCKPLUS.ORG^$document']
+ assert notifications[1]['urlFilters'] == [
+ 'ADBLOCKPLUS.ORG^$document',
+ 'EYEO.COM^$document']
+
if __name__ == '__main__':
unittest.main()
« no previous file with comments | « sitescripts/notifications/parser.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld