Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(367)

Unified Diff: appengine/swarming/handlers_test.py

Issue 2832243002: swarming: mechanical changes to unit tests (Closed)
Patch Set: Disable tx before calling tq Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « appengine/swarming/handlers_endpoints_test.py ('k') | appengine/swarming/server/task_scheduler_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/swarming/handlers_test.py
diff --git a/appengine/swarming/handlers_test.py b/appengine/swarming/handlers_test.py
index 5ea11eceb8e9bc953a88e43ab7b8228ce68f0aa3..9afd46a196d6b9937d43c3c1fa15991031d284af 100755
--- a/appengine/swarming/handlers_test.py
+++ b/appengine/swarming/handlers_test.py
@@ -20,6 +20,7 @@ import webtest
import handlers_backend
import handlers_frontend
import template
+from components import utils
from server import bot_code
from server import bot_management
from server import task_result
@@ -248,6 +249,14 @@ class BackendTest(AppTestBase):
r.template for r in self.app.app.router.match_routes
]
+ def setUp(self):
+ super(BackendTest, self).setUp()
+ self._enqueue_task_orig = self.mock(
+ utils, 'enqueue_task', self._enqueue_task)
+
+ def _enqueue_task(self, **kwargs):
+ return self._enqueue_task_orig(use_dedicated_module=False, **kwargs)
+
def testCronJobTasks(self):
# Tests all the cron tasks are securely handled.
cron_job_urls = [
« no previous file with comments | « appengine/swarming/handlers_endpoints_test.py ('k') | appengine/swarming/server/task_scheduler_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698