Merge branch 'main' into avm99963-monorail

Merged commit 34d8229ae2b51fb1a15bd208e6fe6185c94f6266

GitOrigin-RevId: 7ee0917f93a577e475f8e09526dd144d245593f4
diff --git a/tracker/test/issuereindex_test.py b/tracker/test/issuereindex_test.py
index 715da9a..9929076 100644
--- a/tracker/test/issuereindex_test.py
+++ b/tracker/test/issuereindex_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.
 
 """Unittests for monorail.tracker.issuereindex."""
 from __future__ import print_function
@@ -17,7 +16,6 @@
 
 import settings
 from framework import permissions
-from framework import template_helpers
 from services import service_manager
 from services import tracker_fulltext
 from testing import fake
@@ -45,27 +43,25 @@
     # Non-members and contributors do not have permission to view this page.
     for permission in (permissions.USER_PERMISSIONSET,
                        permissions.COMMITTER_ACTIVE_PERMISSIONSET):
-      request, mr = testing_helpers.GetRequestObjects(
+      _, mr = testing_helpers.GetRequestObjects(
           project=self.project, perms=permission)
-      servlet = issuereindex.IssueReindex(
-          request, 'res', services=self.services)
+      servlet = issuereindex.IssueReindex(services=self.services)
     with self.assertRaises(permissions.PermissionException) as cm:
       servlet.AssertBasePermission(mr)
-    self.assertEqual('You are not allowed to administer this project',
-                     cm.exception.message)
+    self.assertEqual(
+        'You are not allowed to administer this project', str(cm.exception))
 
   def testAssertBasePermission_WithAccess(self):
     # Owners and admins have permission to view this page.
     for permission in (permissions.OWNER_ACTIVE_PERMISSIONSET,
                        permissions.ADMIN_PERMISSIONSET):
-      request, mr = testing_helpers.GetRequestObjects(
+      _, mr = testing_helpers.GetRequestObjects(
           project=self.project, perms=permission)
-      servlet = issuereindex.IssueReindex(
-          request, 'res', services=self.services)
+      servlet = issuereindex.IssueReindex(services=self.services)
       servlet.AssertBasePermission(mr)
 
   def testGatherPageData(self):
-    servlet = issuereindex.IssueReindex('req', 'res', services=self.services)
+    servlet = issuereindex.IssueReindex(services=self.services)
 
     mr = testing_helpers.MakeMonorailRequest()
     mr.auto_submit = True
@@ -76,7 +72,7 @@
     self.assertTrue(ret['page_perms'].CreateIssue)
 
   def _callProcessFormData(self, post_data, index_issue_1=True):
-    servlet = issuereindex.IssueReindex('req', 'res', services=self.services)
+    servlet = issuereindex.IssueReindex(services=self.services)
 
     mr = testing_helpers.MakeMonorailRequest(project=self.project)
     mr.cnxn = self.cnxn
@@ -103,13 +99,13 @@
     post_data = {'start': 1, 'num': 5}
     ret = self._callProcessFormData(post_data)
     self.assertEqual(
-        '/p/None/issues/reindex?start=6&auto_submit=False&num=5', ret)
+        '/p/None/issues/reindex?start=6&num=5&auto_submit=False', ret)
 
   def testProcessFormData_LargeInputs(self):
     post_data = {'start': 0, 'num': 10000000}
     ret = self._callProcessFormData(post_data)
     self.assertEqual(
-        '/p/None/issues/reindex?start=%s&auto_submit=False&num=%s' % (
+        '/p/None/issues/reindex?start=%s&num=%s&auto_submit=False' % (
             settings.max_artifact_search_results_per_page,
             settings.max_artifact_search_results_per_page), ret)
 
@@ -117,11 +113,11 @@
     post_data = {'start': 1, 'num': 5, 'auto_submit': 1}
     ret = self._callProcessFormData(post_data)
     self.assertEqual(
-        '/p/None/issues/reindex?start=6&auto_submit=True&num=5', ret)
+        '/p/None/issues/reindex?start=6&num=5&auto_submit=True', ret)
 
   def testProcessFormData_WithAutoSubmitButNoMoreIssues(self):
     """This project has no issues 6-10, so stop autosubmitting."""
     post_data = {'start': 6, 'num': 5, 'auto_submit': 1}
     ret = self._callProcessFormData(post_data, index_issue_1=False)
     self.assertEqual(
-        '/p/None/issues/reindex?start=11&auto_submit=False&num=5', ret)
+        '/p/None/issues/reindex?start=11&num=5&auto_submit=False', ret)