Merge branch 'main' into avm99963-monorail

Merged commit cd4b3b336f1f14afa02990fdc2eec5d9467a827e

GitOrigin-RevId: e67bbf185d5538e1472bb42e0abb2a141f88bac1
diff --git a/sitewide/test/custom_404_test.py b/sitewide/test/custom_404_test.py
index 71b52f8..b47501d 100644
--- a/sitewide/test/custom_404_test.py
+++ b/sitewide/test/custom_404_test.py
@@ -8,7 +8,7 @@
 from __future__ import division
 from __future__ import absolute_import
 
-import httplib
+from six.moves import http_client
 import unittest
 
 from framework import exceptions
@@ -39,6 +39,4 @@
     _, mr = testing_helpers.GetRequestObjects(path='/p/proj/junk')
 
     page_data = self.servlet.GatherPageData(mr)
-    self.assertEqual(
-      {'http_response_code': httplib.NOT_FOUND},
-      page_data)
+    self.assertEqual({'http_response_code': http_client.NOT_FOUND}, page_data)
diff --git a/sitewide/test/hostinghome_test.py b/sitewide/test/hostinghome_test.py
index f51c9ec..de125a5 100644
--- a/sitewide/test/hostinghome_test.py
+++ b/sitewide/test/hostinghome_test.py
@@ -47,7 +47,7 @@
     self.project_a = self.services.project.TestAddProject('a', project_id=1)
     self.project_b = self.services.project.TestAddProject('b', project_id=2)
 
-    self.servlet = hostinghome.HostingHome('req', 'res', services=self.services)
+    self.servlet = hostinghome.HostingHome(services=self.services)
     self.mr = testing_helpers.MakeMonorailRequest(user_info={'user_id': 111})
 
     self.orig_pipeline_class = projectsearch.ProjectSearchPipeline
diff --git a/sitewide/test/userprofile_test.py b/sitewide/test/userprofile_test.py
index b830fb7..b4e29d8 100644
--- a/sitewide/test/userprofile_test.py
+++ b/sitewide/test/userprofile_test.py
@@ -49,6 +49,7 @@
   mr.viewed_user_auth.user_view = framework_views.UserView(viewed_user_pb)
   mr.viewed_user_name = viewed_user_name
   mr.request = webapp2.Request.blank("/")
+  mr.request_path = mr.request.path
   return mr