 Issue 29500676:
  Issue 5456 - Add support to specify urlFilters in the notification repository  (Closed)
    
  
    Issue 29500676:
  Issue 5456 - Add support to specify urlFilters in the notification repository  (Closed) 
  | Index: sitescripts/notifications/test/parser.py | 
| diff --git a/sitescripts/notifications/test/parser.py b/sitescripts/notifications/test/parser.py | 
| index e5b5e37f7025779f93e1098c3d2e2f8f6c4aa8de..84f1c04c733111b6fa6fe30a17916b9d039c7aa4 100644 | 
| --- a/sitescripts/notifications/test/parser.py | 
| +++ b/sitescripts/notifications/test/parser.py | 
| @@ -154,6 +154,21 @@ 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 | 
| + | 
| + self.assertEqual( | 
| 
Vasily Kuznetsov
2017/09/21 09:44:10
These following two asserts would look even better
 
wspee
2017/09/21 10:11:34
Done.
 | 
| + notifications[0]['urlFilters'], ['ADBLOCKPLUS.ORG^$document']) | 
| + self.assertEqual(notifications[1]['urlFilters'], [ | 
| + 'ADBLOCKPLUS.ORG^$document', | 
| + 'EYEO.COM^$document']) | 
| + | 
| if __name__ == '__main__': | 
| unittest.main() |