Merge branch 'main' into avm99963-monorail
Merged commit 34d8229ae2b51fb1a15bd208e6fe6185c94f6266
GitOrigin-RevId: 7ee0917f93a577e475f8e09526dd144d245593f4
diff --git a/features/test/send_notifications_test.py b/features/test/send_notifications_test.py
index b15fb23..b60130f 100644
--- a/features/test/send_notifications_test.py
+++ b/features/test/send_notifications_test.py
@@ -1,7 +1,6 @@
-# Copyright 2016 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style
-# license that can be found in the LICENSE file or at
-# https://developers.google.com/open-source/licenses/bsd
+# Copyright 2016 The Chromium Authors
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
"""Tests for prepareandsend.py"""
from __future__ import print_function
@@ -96,8 +95,8 @@
create_task_mock, urls.NOTIFY_BULK_CHANGE_TASK + '.do')
self.assertEqual(1, len(call_args_list))
_path, params = self._get_create_task_path_and_params(call_args_list[0])
- self.assertEqual(params['comment_text'], 'comment')
- self.assertEqual(params['amendments'], '')
+ self.assertEqual(params[b'comment_text'], b'comment')
+ self.assertEqual(params[b'amendments'], b'')
@mock.patch('framework.cloud_tasks_helpers.create_task')
def testSendIssueBulkChangeNotification_Normal(self, create_task_mock):
@@ -119,10 +118,10 @@
create_task_mock, urls.NOTIFY_BULK_CHANGE_TASK + '.do')
self.assertEqual(1, len(call_args_list))
_path, params = self._get_create_task_path_and_params(call_args_list[0])
- self.assertEqual(params['comment_text'], 'comment')
+ self.assertEqual(params[b'comment_text'], b'comment')
self.assertEqual(
- params['amendments'].split('\n'),
- [' Status: New', ' Labels: -Removed Added'])
+ params[b'amendments'].split(b'\n'),
+ [b' Status: New', b' Labels: -Removed Added'])
@mock.patch('framework.cloud_tasks_helpers.create_task')
def testPrepareAndSendDeletedFilterRulesNotifications(self, create_task_mock):
@@ -134,6 +133,6 @@
create_task_mock, urls.NOTIFY_RULES_DELETED_TASK + '.do')
self.assertEqual(1, len(call_args_list))
_path, params = self._get_create_task_path_and_params(call_args_list[0])
- self.assertEqual(params['project_id'], '789')
+ self.assertEqual(params[b'project_id'], b'789')
self.assertEqual(
- params['filter_rules'], 'if yellow make orange,if orange make blue')
+ params[b'filter_rules'], b'if yellow make orange,if orange make blue')