diff --git a/api/v3/test/converters_test.py b/api/v3/test/converters_test.py
index 1bbd12c..088de89 100644
--- a/api/v3/test/converters_test.py
+++ b/api/v3/test/converters_test.py
@@ -1,6 +1,6 @@
-# Copyright 2020 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.
+# 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 converting internal protorpc to external protoc."""
 
 from __future__ import print_function
@@ -32,7 +32,7 @@
 from testing import testing_helpers
 from tracker import field_helpers
 from services import service_manager
-from proto import tracker_pb2
+from mrproto import tracker_pb2
 from tracker import tracker_bizobj as tbo
 
 EXPLICIT_DERIVATION = issue_objects_pb2.Derivation.Value('EXPLICIT')
@@ -896,23 +896,24 @@
 
   def testIngestAttachmentUploads(self):
     up_1 = issues_pb2.AttachmentUpload(
-        filename='clown.gif', content='iTs prOUnOuNcED JIF')
-    up_2 = issues_pb2.AttachmentUpload(
-        filename='mowgli', content='cutest dog')
+        filename='clown.gif', content=b'iTs prOUnOuNcED JIF')
+    up_2 = issues_pb2.AttachmentUpload(filename='mowgli', content=b'cutest dog')
 
     ingested = self.converter.IngestAttachmentUploads([up_1, up_2])
-    expected = [framework_helpers.AttachmentUpload(
-        'clown.gif', 'iTs prOUnOuNcED JIF', 'image/gif'),
-                framework_helpers.AttachmentUpload(
-                    'mowgli', 'cutest dog', 'text/plain')]
+    expected = [
+        framework_helpers.AttachmentUpload(
+            'clown.gif', b'iTs prOUnOuNcED JIF', 'image/gif'),
+        framework_helpers.AttachmentUpload(
+            'mowgli', b'cutest dog', 'text/plain')
+    ]
     self.assertEqual(ingested, expected)
 
   def testtIngestAttachmentUploads_Invalid(self):
     up_1 = issues_pb2.AttachmentUpload(filename='clown.gif')
-    up_2 = issues_pb2.AttachmentUpload(content='cutest dog')
+    up_2 = issues_pb2.AttachmentUpload(content=b'cutest dog')
 
-    with self.assertRaisesRegexp(
-        exceptions.InputException, 'Uploaded .+\nUploaded .+'):
+    with self.assertRaisesRegex(exceptions.InputException,
+                                'Uploaded .+\nUploaded .+'):
       self.converter.IngestAttachmentUploads([up_1, up_2])
 
   def testIngestIssueDeltas(self):
@@ -1263,8 +1264,7 @@
     err_msgs.append(
         'Invalid `update_mask` for projects/proj-780/issues/3 delta.')
 
-    with self.assertRaisesRegexp(exceptions.InputException,
-                                 '\n'.join(err_msgs)):
+    with self.assertRaisesRegex(exceptions.InputException, '\n'.join(err_msgs)):
       self.converter.IngestIssueDeltas(api_deltas)
 
   def testIngestIssueDeltas_OutputOnlyIgnored(self):
@@ -1383,7 +1383,7 @@
         r'eldDefs/2\): Could not parse NoDate',
     ]
     error_messages_re = '\n'.join(error_messages)
-    with self.assertRaisesRegexp(exceptions.InputException, error_messages_re):
+    with self.assertRaisesRegex(exceptions.InputException, error_messages_re):
       self.converter.IngestIssueDeltas([api_delta])
 
   @mock.patch('time.time', mock.MagicMock(return_value=CURRENT_TIME))
@@ -1450,7 +1450,7 @@
         approval_value=issue_objects_pb2.ApprovalValue(name=av_name),
         update_mask=field_mask_pb2.FieldMask(paths=['chicken']))
     expected_err = 'Invalid `update_mask` for %s delta' % av_name
-    with self.assertRaisesRegexp(exceptions.InputException, expected_err):
+    with self.assertRaisesRegex(exceptions.InputException, expected_err):
       self.converter.IngestApprovalDeltas([approval_delta], self.user_1.user_id)
 
   def testIngestApprovalDeltas_FilterFieldValues(self):
@@ -1483,8 +1483,8 @@
         field_vals_remove=[approval_enum_fv, approval_2_fv],
         approvers_remove=['users/222'],
     )
-    with self.assertRaisesRegexp(exceptions.InputException,
-                                 'Field .* does not belong to approval .*'):
+    with self.assertRaisesRegex(exceptions.InputException,
+                                'Field .* does not belong to approval .*'):
       self.converter.IngestApprovalDeltas([approval_delta], self.user_1.user_id)
 
   def testIngestApprovalDeltas_InvalidFieldValues(self):
@@ -1511,7 +1511,7 @@
         approval_value=av,
         approvers_remove=['users/222'],
     )
-    with self.assertRaisesRegexp(
+    with self.assertRaisesRegex(
         exceptions.InputException,
         'Field projects/proj/fieldDefs/404 is not in this project'):
       self.converter.IngestApprovalDeltas([approval_delta], self.user_1.user_id)
@@ -1739,7 +1739,7 @@
             name=project1_av_name, field_values=[project1_fv, project2_fv]),
         update_mask=field_mask_pb2.FieldMask(paths=['field_values']))
 
-    with self.assertRaisesRegexp(
+    with self.assertRaisesRegex(
         exceptions.InputException,
         'Field projects/proj/fieldDefs/%d is not in this project' %
         self.field_def_6):
@@ -2028,7 +2028,7 @@
         r'.+issue:.+[\n\r]+: Issue.+404.+not found'
     ]
     error_messages_re = '\n'.join(error_messages)
-    with self.assertRaisesRegexp(exceptions.InputException, error_messages_re):
+    with self.assertRaisesRegex(exceptions.InputException, error_messages_re):
       self.converter.IngestIssue(ingest, self.project_1.project_id)
 
   def testIngestIssuesListColumns(self):
