Merge branch 'main' into avm99963-monorail

Merged commit 34d8229ae2b51fb1a15bd208e6fe6185c94f6266

GitOrigin-RevId: 7ee0917f93a577e475f8e09526dd144d245593f4
diff --git a/tracker/test/issueimport_test.py b/tracker/test/issueimport_test.py
index c0e38af..05c7526 100644
--- a/tracker/test/issueimport_test.py
+++ b/tracker/test/issueimport_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 the issueimport servlet."""
 from __future__ import print_function
@@ -14,15 +13,14 @@
 from services import service_manager
 from testing import testing_helpers
 from tracker import issueimport
-from proto import tracker_pb2
+from mrproto import tracker_pb2
 
 
 class IssueExportTest(unittest.TestCase):
 
   def setUp(self):
     self.services = service_manager.Services()
-    self.servlet = issueimport.IssueImport(
-        'req', 'res', services=self.services)
+    self.servlet = issueimport.IssueImport(services=self.services)
     self.event_log = None
 
   def testAssertBasePermission(self):
@@ -37,6 +35,12 @@
   def testParseComment(self):
     """Test a Comment JSON is correctly parsed."""
     users_id_dict = {'adam@test.com': 111}
+    config = {
+        'component_defs': [{
+            'path': 'comp1',
+            'component_id': 1,
+        }],
+    }
     json = {
         'timestamp': 123,
         'commenter': 'adam@test.com',
@@ -46,7 +50,12 @@
         'description_num': None,
         }
     comment = self.servlet._ParseComment(
-        12, users_id_dict, json, self.event_log)
+        12,
+        users_id_dict,
+        json,
+        self.event_log,
+        config,
+    )
     self.assertEqual(
         comment, tracker_pb2.IssueComment(
             project_id=12, timestamp=123, user_id=111,
@@ -61,7 +70,7 @@
         'attachments': [],
     }
     desc_comment = self.servlet._ParseComment(
-        12, users_id_dict, json_desc, self.event_log)
+        12, users_id_dict, json_desc, self.event_log, config)
     self.assertEqual(
         desc_comment, tracker_pb2.IssueComment(
             project_id=12, timestamp=223, user_id=111,