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

Unified Diff: appengine/gce-backend/instance_templates_test.py

Issue 2713533002: Refactor task enqueuing (Closed)
Patch Set: Remove metric Created 3 years, 10 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/gce-backend/instance_templates.py ('k') | appengine/gce-backend/instances.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/gce-backend/instance_templates_test.py
diff --git a/appengine/gce-backend/instance_templates_test.py b/appengine/gce-backend/instance_templates_test.py
index 3ebe15bd00c08c2b2721447d27f275f086fd5345..aee9644c09f2c8c0bad0ea7a11143a53453ab138 100755
--- a/appengine/gce-backend/instance_templates_test.py
+++ b/appengine/gce-backend/instance_templates_test.py
@@ -363,15 +363,14 @@ class ScheduleCreationTest(test_case.TestCase):
"""Tests for instance_templates.schedule_creation."""
def setUp(self, *args, **kwargs):
- def enqueue_task(*args, **kwargs):
- self.failUnless(kwargs.get('params', {}).get('key'))
- entity = ndb.Key(urlsafe=kwargs['params']['key']).get()
- entity.url = kwargs['params']['key']
+ def enqueue_task(taskqueue, key):
+ entity = key.get()
+ entity.url = key.urlsafe()
entity.put()
return True
super(ScheduleCreationTest, self).setUp(*args, **kwargs)
- self.mock(instance_templates.utils, 'enqueue_task', enqueue_task)
+ self.mock(instance_templates.utilities, 'enqueue_task', enqueue_task)
def test_enqueues_task(self):
"""Ensures a task is enqueued."""
« no previous file with comments | « appengine/gce-backend/instance_templates.py ('k') | appengine/gce-backend/instances.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698