Merge branch 'main' into avm99963-monorail

Merged commit 34d8229ae2b51fb1a15bd208e6fe6185c94f6266

GitOrigin-RevId: 7ee0917f93a577e475f8e09526dd144d245593f4
diff --git a/features/test/dateaction_test.py b/features/test/dateaction_test.py
index 8ca5bc3..2b443c6 100644
--- a/features/test/dateaction_test.py
+++ b/features/test/dateaction_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.
 
 """Unittest for the dateaction module."""
 
@@ -20,7 +19,7 @@
 from framework import framework_views
 from framework import timestr
 from framework import urls
-from proto import tracker_pb2
+from mrproto import tracker_pb2
 from services import service_manager
 from testing import fake
 from testing import testing_helpers
@@ -86,15 +85,15 @@
         'app_engine_http_request':
             {
                 'relative_uri': urls.ISSUE_DATE_ACTION_TASK + '.do',
-                'body': 'issue_id=78901',
+                'body': b'issue_id=78901',
                 'headers': {
                     'Content-type': 'application/x-www-form-urlencoded'
                 }
             }
     }
     get_client_mock().create_task.assert_any_call(
-        get_client_mock().queue_path(),
-        expected_task,
+        parent=get_client_mock().queue_path(),
+        task=expected_task,
         retry=cloud_tasks_helpers._DEFAULT_RETRY)
 
   @mock.patch('framework.cloud_tasks_helpers._get_client')
@@ -104,15 +103,15 @@
         'app_engine_http_request':
             {
                 'relative_uri': urls.ISSUE_DATE_ACTION_TASK + '.do',
-                'body': 'issue_id=78901',
+                'body': b'issue_id=78901',
                 'headers': {
                     'Content-type': 'application/x-www-form-urlencoded'
                 }
             }
     }
     get_client_mock().create_task.assert_any_call(
-        get_client_mock().queue_path(),
-        expected_task,
+        parent=get_client_mock().queue_path(),
+        task=expected_task,
         retry=cloud_tasks_helpers._DEFAULT_RETRY)
 
 
@@ -290,32 +289,3 @@
     self.assertEqual(1, len(tasks))
     notify_owner_task = tasks[0]
     self.assertEqual('starrer333@example.com', notify_owner_task['to'])
-
-  def testCalculateIssuePings_Normal(self):
-    """Return a ping for an issue that has a date that happened today."""
-    issue = fake.MakeTestIssue(
-        789, 1, 'summary', 'New', 0, issue_id=78901)
-    self.services.issue.TestAddIssue(issue)
-    now = int(time.time())
-    self.SetUpFieldValues(issue, now)
-    issue.project_name = 'proj'
-
-    pings = self.servlet._CalculateIssuePings(issue, self.config)
-
-    self.assertEqual(
-        [(self.config.field_defs[1], now),
-         (self.config.field_defs[0], now)],
-        pings)
-
-  def testCalculateIssuePings_Closed(self):
-    """Don't ping for a closed issue."""
-    issue = fake.MakeTestIssue(
-        789, 1, 'summary', 'Fixed', 0, issue_id=78901)
-    self.services.issue.TestAddIssue(issue)
-    now = int(time.time())
-    self.SetUpFieldValues(issue, now)
-    issue.project_name = 'proj'
-
-    pings = self.servlet._CalculateIssuePings(issue, self.config)
-
-    self.assertEqual([], pings)