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

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

Issue 29570562: Issue 5827 - Assign new groups even if prior groups are present (Closed)
Patch Set: Removed return to make in-place editing more apparent Created Oct. 10, 2017, 2:46 p.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 | « no previous file | sitescripts/notifications/web/notification.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sitescripts/notifications/test/notification.py
diff --git a/sitescripts/notifications/test/notification.py b/sitescripts/notifications/test/notification.py
index d19889831d157e819fb6c6ecbf3b385204223a68..d7f1adbc149410e5c4bbef64e9c92aafb6ee6bb2 100644
--- a/sitescripts/notifications/test/notification.py
+++ b/sitescripts/notifications/test/notification.py
@@ -350,6 +350,20 @@ class TestNotification(unittest.TestCase):
self.assertEqual(len(result['notifications']), 0)
self.assertRegexpMatches(result['version'], r'-a/0')
+ def test_stays_in_group_when_notification_inactive_assign_new_group(self):
+ # See: https://issues.adblockplus.org/ticket/5827
+ self.load_notifications_mock.return_value = [
+ {'id': '1', 'inactive': True},
+ {'id': '2', 'variants': [
+ {'sample': 1, 'title': {'en-US': '2.1'}, 'message': {'en-US': '2.1'}},
+ ]},
+ ]
+ result = json.loads(notification.notification({
+ 'QUERY_STRING': 'lastVersion=197001010000-1/0'
+ }, lambda *args: None))
+ self.assertEqual(len(result['notifications']), 1)
+ self.assertRegexpMatches(result['version'], r'-1/0-2/1')
+
def test_inactive_notifications_not_returned(self):
self.load_notifications_mock.return_value = [
{'id': 'a', 'title': {'en-US': ''}, 'message': {'en-US': ''}, 'inactive': True},
« no previous file with comments | « no previous file | sitescripts/notifications/web/notification.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld