Merge branch 'main' into avm99963-monorail

Merged commit 34d8229ae2b51fb1a15bd208e6fe6185c94f6266

GitOrigin-RevId: 7ee0917f93a577e475f8e09526dd144d245593f4
diff --git a/api/test/sitewide_servicer_test.py b/api/test/sitewide_servicer_test.py
index a15fc75..4a76033 100644
--- a/api/test/sitewide_servicer_test.py
+++ b/api/test/sitewide_servicer_test.py
@@ -1,7 +1,6 @@
-# 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 sitewide servicer."""
 from __future__ import print_function
@@ -41,7 +40,7 @@
   @mock.patch('time.time')
   def testRefreshToken(self, mockTime, mockGetXSRFKey):
     """We can refresh an expired token."""
-    mockGetXSRFKey.side_effect = lambda: 'fakeXSRFKey'
+    mockGetXSRFKey.side_effect = lambda: b'fakeXSRFKey'
     # The token is at the brink of being too old
     mockTime.side_effect = lambda: 1 + xsrf.REFRESH_TOKEN_TIMEOUT_SEC
 
@@ -64,7 +63,7 @@
   @mock.patch('time.time')
   def testRefreshToken_InvalidToken(self, mockTime, mockGetXSRFKey):
     """We reject attempts to refresh an invalid token."""
-    mockGetXSRFKey.side_effect = ['fakeXSRFKey']
+    mockGetXSRFKey.side_effect = [b'fakeXSRFKey']
     mockTime.side_effect = [123]
 
     token_path = 'token_path'
@@ -82,7 +81,7 @@
   @mock.patch('time.time')
   def testRefreshToken_TokenTooOld(self, mockTime, mockGetXSRFKey):
     """We reject attempts to refresh a token that's too old."""
-    mockGetXSRFKey.side_effect = lambda: 'fakeXSRFKey'
+    mockGetXSRFKey.side_effect = lambda: b'fakeXSRFKey'
     mockTime.side_effect = lambda: 2 + xsrf.REFRESH_TOKEN_TIMEOUT_SEC
 
     token_path = 'token_path'