8000 Merge pull request #1114 from GoogleCloudPlatform/tasks-tests · howinator/python-docs-samples@fcd8186 · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit fcd8186

Browse files
authored
Merge pull request GoogleCloudPlatform#1114 from GoogleCloudPlatform/tasks-tests
Fix Tasks sample test issues.
2 parents 356dcb1 + cb02909 commit fcd8186

File tree

4 files changed

+3
-6
lines changed

4 files changed

+3
-6
lines changed

appengine/flexible/tasks/main_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def test_index(app):
3232
def test_log_payload(logging_mock, app):
3333
payload = 'hello'
3434

35-
r = app.post('/log_payload', payload)
35+
r = app.post('/log_payload', data=payload)
3636
assert r.status_code == 200
3737

3838
assert logging_mock.called

tasks/pull_queue_snippets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def create_task(project, queue, location):
3838
task = {
3939
'task': {
4040
'pull_task_target': {
41-
'payload': base64.b64encode(payload)
41+
'payload': base64.b64encode(payload.encode()).decode()
4242
}
4343
}
4444
}

tasks/pull_queue_snippets_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
TEST_PROJECT_ID = os.getenv('GCLOUD_PROJECT')
2020
TEST_LOCATION = os.getenv('TEST_QUEUE_LOCATION', 'us-central1')
21-
TEST_QUEUE_NAME = os.getenv('TEST_QUEUE_NAME', 'test-queue')
21+
TEST_QUEUE_NAME = os.getenv('TEST_QUEUE_NAME', 'my-pull-queue')
2222

2323

2424
def test_create_task():

tasks/queue.yaml

Lines changed: 0 additions & 3 deletions
< 387D div data-testid="neutral diffstat" class="DiffSquares-module__diffSquare--h5kjy DiffSquares-module__neutral--VlyoP">
This file was deleted.

0 commit comments

Comments
 (0)
0