Merge branch 'main' into avm99963-monorail
Merged commit 3779da353b36d43cf778e7d4f468097714dd4540
GitOrigin-RevId: 6451a5c6b75afb0fd1f37b3f14521148d0722ea8
diff --git a/search/backendnonviewable.py b/search/backendnonviewable.py
index 23b601c..ab751a4 100644
--- a/search/backendnonviewable.py
+++ b/search/backendnonviewable.py
@@ -37,8 +37,7 @@
NONVIEWABLE_MEMCACHE_EXPIRATION = 15 * framework_constants.SECS_PER_MINUTE
-# Change to FlaskInternalTask
-class BackendNonviewable(jsonfeed.InternalTask):
+class BackendNonviewable(jsonfeed.FlaskInternalTask):
"""JSON servlet for getting issue IDs that the specified user cannot view."""
CHECK_SAME_APP = True
@@ -137,8 +136,8 @@
return ok_iids
- # def GetBackendNonviewable(self, **kwargs):
- # return self.handler(**kwargs)
+ def GetBackendNonviewable(self, **kwargs):
+ return self.handler(**kwargs)
- # def PostBackendNonviewable(self, **kwargs):
- # return self.handler(**kwargs)
+ def PostBackendNonviewable(self, **kwargs):
+ return self.handler(**kwargs)
diff --git a/search/backendsearch.py b/search/backendsearch.py
index 1da9975..91a00dc 100644
--- a/search/backendsearch.py
+++ b/search/backendsearch.py
@@ -31,8 +31,7 @@
from tracker import tracker_constants
-# Change to FlaskInternalTask
-class BackendSearch(jsonfeed.InternalTask):
+class BackendSearch(jsonfeed.FlaskInternalTask):
"""JSON servlet for issue search in a GAE backend."""
CHECK_SAME_APP = True
@@ -76,8 +75,8 @@
'error': error_message,
}
- # def GetBackendSearch(self, **kwargs):
- # return self.handler(**kwargs)
+ def GetBackendSearch(self, **kwargs):
+ return self.handler(**kwargs)
- # def PostBackendSearch(self, **kwargs):
- # return self.handler(**kwargs)
+ def PostBackendSearch(self, **kwargs):
+ return self.handler(**kwargs)
diff --git a/search/test/backendnonviewable_test.py b/search/test/backendnonviewable_test.py
index 6c50fb7..5360a93 100644
--- a/search/test/backendnonviewable_test.py
+++ b/search/test/backendnonviewable_test.py
@@ -9,7 +9,10 @@
from __future__ import absolute_import
import unittest
-import mox
+try:
+ from mox3 import mox
+except ImportError:
+ import mox
from google.appengine.api import memcache
from google.appengine.ext import testbed
@@ -36,8 +39,7 @@
self.mr.shard_id = 2
self.mr.invalidation_timestep = 12345
- self.servlet = backendnonviewable.BackendNonviewable(
- 'req', 'res', services=self.services)
+ self.servlet = backendnonviewable.BackendNonviewable(services=self.services)
self.mox = mox.Mox()
self.testbed = testbed.Testbed()
diff --git a/search/test/backendsearch_test.py b/search/test/backendsearch_test.py
index dd5ed18..6a9a710 100644
--- a/search/test/backendsearch_test.py
+++ b/search/test/backendsearch_test.py
@@ -9,7 +9,10 @@
from __future__ import absolute_import
import unittest
-import mox
+try:
+ from mox3 import mox
+except ImportError:
+ import mox
import settings
from search import backendsearch
@@ -31,8 +34,7 @@
self.mr.specified_logged_in_user_id = 111
self.mr.specified_me_user_ids = [222]
self.mr.shard_id = 2
- self.servlet = backendsearch.BackendSearch(
- 'req', 'res', services=self.services)
+ self.servlet = backendsearch.BackendSearch(services=self.services)
self.mox = mox.Mox()
def tearDown(self):
diff --git a/search/test/backendsearchpipeline_test.py b/search/test/backendsearchpipeline_test.py
index 212f5a6..dab2dba 100644
--- a/search/test/backendsearchpipeline_test.py
+++ b/search/test/backendsearchpipeline_test.py
@@ -8,7 +8,10 @@
from __future__ import division
from __future__ import absolute_import
-import mox
+try:
+ from mox3 import mox
+except ImportError:
+ import mox
import unittest
from google.appengine.api import memcache
diff --git a/search/test/frontendsearchpipeline_test.py b/search/test/frontendsearchpipeline_test.py
index 432a9d1..9a94c3d 100644
--- a/search/test/frontendsearchpipeline_test.py
+++ b/search/test/frontendsearchpipeline_test.py
@@ -8,7 +8,10 @@
from __future__ import division
from __future__ import absolute_import
-import mox
+try:
+ from mox3 import mox
+except ImportError:
+ import mox
import unittest
from google.appengine.api import memcache
diff --git a/search/test/search_helpers_test.py b/search/test/search_helpers_test.py
index 5905234..b9cfb51 100644
--- a/search/test/search_helpers_test.py
+++ b/search/test/search_helpers_test.py
@@ -8,7 +8,10 @@
from __future__ import division
from __future__ import absolute_import
-import mox
+try:
+ from mox3 import mox
+except ImportError:
+ import mox
import unittest
from search import search_helpers