Merge branch 'main' into avm99963-monorail

Merged commit 34d8229ae2b51fb1a15bd208e6fe6185c94f6266

GitOrigin-RevId: 7ee0917f93a577e475f8e09526dd144d245593f4
diff --git a/api/test/users_servicer_test.py b/api/test/users_servicer_test.py
index f9b6480..892e2ce 100644
--- a/api/test/users_servicer_test.py
+++ b/api/test/users_servicer_test.py
@@ -1,13 +1,14 @@
-# Copyright 2018 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 2018 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 users servicer."""
 from __future__ import print_function
 from __future__ import division
 from __future__ import absolute_import
 
+import pytest
+import six
 import unittest
 
 try:
@@ -25,9 +26,9 @@
 from framework import exceptions
 from framework import monorailcontext
 from framework import permissions
-from proto import project_pb2
-from proto import tracker_pb2
-from proto import user_pb2
+from mrproto import project_pb2
+from mrproto import tracker_pb2
+from mrproto import user_pb2
 from testing import fake
 from services import service_manager
 
@@ -84,7 +85,7 @@
             display_name='group2@test.com', user_id=self.group2_id)
     ]
 
-    self.assertItemsEqual(expected_group_refs, response.group_refs)
+    six.assertCountEqual(self, expected_group_refs, response.group_refs)
 
   def testGetMemberships_NonExistentUser(self):
     request = users_pb2.GetMembershipsRequest(
@@ -556,16 +557,19 @@
       self.services.project.TestAddProject(
           'owner-%s-%s' % (name, user_id), state=state, owner_ids=[user_id])
       self.services.project.TestAddProject(
-          'committer-%s-%s' % (name, user_id), state=state,\
+          'committer-%s-%s' % (name, user_id),
+          state=state,
           committer_ids=[user_id])
-      contributor = self.services.project.TestAddProject(
-          'contributor-%s-%s' % (name, user_id), state=state)
-      contributor.contributor_ids = [user_id]
+      self.services.project.TestAddProject(
+          'contributor-%s-%s' % (name, user_id),
+          state=state,
+          contrib_ids=[user_id])
 
     members_only = self.services.project.TestAddProject(
         'members-only-' + str(user_id), owner_ids=[user_id])
     members_only.access = project_pb2.ProjectAccess.MEMBERS_ONLY
 
+  @pytest.mark.skip(reason='Test is flaky (https://crbug.com/monorail/12052)')
   def testGetUsersProjects(self):
     self.user = self.services.user.TestAddUser('test3@example.com', 333)
     self.services.project_star.SetStar(