Merge branch 'main' into avm99963-monorail

Merged commit 34d8229ae2b51fb1a15bd208e6fe6185c94f6266

GitOrigin-RevId: 7ee0917f93a577e475f8e09526dd144d245593f4
diff --git a/framework/test/cloud_tasks_helpers_test.py b/framework/test/cloud_tasks_helpers_test.py
index 09ad2cd..bbc52b0 100644
--- a/framework/test/cloud_tasks_helpers_test.py
+++ b/framework/test/cloud_tasks_helpers_test.py
@@ -1,4 +1,4 @@
-# Copyright 2020 The Chromium Authors. All rights reserved.
+# Copyright 2020 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 the cloud tasks helper module."""
@@ -34,8 +34,8 @@
     get_client_mock().queue_path.assert_called_with(
         settings.app_id, settings.CLOUD_TASKS_REGION, queue)
     get_client_mock().create_task.assert_called_once()
-    ((_parent, called_task), _kwargs) = get_client_mock().create_task.call_args
-    self.assertEqual(called_task, task)
+    _, kwargs = get_client_mock().create_task.call_args
+    self.assertEqual(kwargs['task'], task)
 
   @mock.patch('framework.cloud_tasks_helpers._get_client')
   def test_create_task_raises(self, get_client_mock):
@@ -53,7 +53,7 @@
 
     cloud_tasks_helpers.create_task(task)
 
-    (_args, kwargs) = get_client_mock().create_task.call_args
+    _, kwargs = get_client_mock().create_task.call_args
     self.assertEqual(kwargs.get('retry'), cloud_tasks_helpers._DEFAULT_RETRY)
 
   def test_generate_simple_task(self):
@@ -66,7 +66,7 @@
         'app_engine_http_request':
             {
                 'relative_uri': '/alphabet/letters',
-                'body': 'a=a&b=b',
+                'body': b'a=a&b=b',
                 'headers': {
                     'Content-type': 'application/x-www-form-urlencoded'
                 }
@@ -79,7 +79,7 @@
         'app_engine_http_request':
             {
                 'relative_uri': '/alphabet/letters',
-                'body': '',
+                'body': b'',
                 'headers': {
                     'Content-type': 'application/x-www-form-urlencoded'
                 }