From e558d20d1f3668a13d6b4be637c28f3c2bca7b59 Mon Sep 17 00:00:00 2001 From: Andrew Gorcester Date: Thu, 14 Sep 2017 15:31:55 -0700 Subject: [PATCH 1/2] Fix Tasks sample test issues. --- appengine/flexible/tasks/main_test.py | 2 +- tasks/pull_queue_snippets.py | 2 +- tasks/pull_queue_snippets_test.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/appengine/flexible/tasks/main_test.py b/appengine/flexible/tasks/main_test.py index d81529c5227..3ae5f2f345b 100644 --- a/appengine/flexible/tasks/main_test.py +++ b/appengine/flexible/tasks/main_test.py @@ -32,7 +32,7 @@ def test_index(app): def test_log_payload(logging_mock, app): payload = 'hello' - r = app.post('/log_payload', payload) + r = app.post('/log_payload', data=payload) assert r.status_code == 200 assert logging_mock.called diff --git a/tasks/pull_queue_snippets.py b/tasks/pull_queue_snippets.py index 8d898a58a0a..9fb08e1e882 100644 --- a/tasks/pull_queue_snippets.py +++ b/tasks/pull_queue_snippets.py @@ -38,7 +38,7 @@ def create_task(project, queue, location): task = { 'task': { 'pull_task_target': { - 'payload': base64.b64encode(payload) + 'payload': base64.b64encode(payload.encode()).decode() } } } diff --git a/tasks/pull_queue_snippets_test.py b/tasks/pull_queue_snippets_test.py index 6905fdb3abc..e7f9f17037a 100644 --- a/tasks/pull_queue_snippets_test.py +++ b/tasks/pull_queue_snippets_test.py @@ -18,7 +18,7 @@ TEST_PROJECT_ID = os.getenv('GCLOUD_PROJECT') TEST_LOCATION = os.getenv('TEST_QUEUE_LOCATION', 'us-central1') -TEST_QUEUE_NAME = os.getenv('TEST_QUEUE_NAME', 'test-queue') +TEST_QUEUE_NAME = os.getenv('TEST_QUEUE_NAME', 'my-pull-queue') def test_create_task(): From cb02909cf04283303cb74526eaea6e832b870815 Mon Sep 17 00:00:00 2001 From: Andrew Gorcester Date: Thu, 14 Sep 2017 15:49:31 -0700 Subject: [PATCH 2/2] Remove queue.yaml, now unused --- tasks/queue.yaml | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 tasks/queue.yaml diff --git a/tasks/queue.yaml b/tasks/queue.yaml deleted file mode 100644 index 08c1503b495..00000000000 --- a/tasks/queue.yaml +++ /dev/null @@ -1,3 +0,0 @@ -queue: -- name: my-pull-queue - mode: pull