Skip to content

Commit e558d20

Browse files
committed
Fix Tasks sample test issues.
1 parent 356dcb1 commit e558d20

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
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():

0 commit comments

Comments
 (0)