Skip to content

Commit

Permalink
lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Tulsishah committed Oct 18, 2024
1 parent 569a1ec commit 2b3408e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
2 changes: 2 additions & 0 deletions testbench/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -893,6 +893,7 @@ def wrapper(*args, **kwargs):

return retry_test


def get_stall_uploads_after_bytes(
database, request, context=None, transport="HTTP"
):
Expand Down Expand Up @@ -948,6 +949,7 @@ def get_retry_uploads_error_after_bytes(

return 0, 0, ""


def handle_stall_uploads_after_bytes(
upload,
data,
Expand Down
1 change: 0 additions & 1 deletion testbench/rest_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -1170,7 +1170,6 @@ def resumable_upload_chunk(bucket_name):
return upload.resumable_status_rest(override_308=override_308)



@upload.route("/b/<bucket_name>/o", methods=["DELETE"])
@retry_test(method="storage.objects.delete")
def delete_resumable_upload(bucket_name):
Expand Down
20 changes: 12 additions & 8 deletions tests/test_testbench_retry.py
Original file line number Diff line number Diff line change
Expand Up @@ -665,18 +665,22 @@ def test_write_retry_test_stall_after_bytes(self):
# Setup a stall for reading back the object.
response = self.client.post(
"/retry_test",
data=json.dumps({
"instructions": {
"storage.objects.insert": [
"stall-for-1s-after-250K",
"stall-for-1s-after-300K"
]
data=json.dumps(
{
"instructions": {
"storage.objects.insert": [
"stall-for-1s-after-250K",
"stall-for-1s-after-300K"
]
}
}
}),
),
content_type='application/json'
)
self.assertEqual(response.status_code, 200)
self.assertTrue(response.headers.get("content-type").startswith("application/json"))
self.assertTrue(
response.headers.get("content-type").startswith("application/json")
)

create_rest = json.loads(response.data)
self.assertIn("id", create_rest)
Expand Down

0 comments on commit 2b3408e

Please sign in to comment.