@@ -322,7 +322,7 @@ def minio_uri():
322322
323323 # For convenience, we split the bucket from a string
324324 url = urlparse (uri )
325- bucket = url .path .lstrip ("/" )
325+ bucket_name = url .path .lstrip ("/" )
326326 uri = url ._replace (netloc = "{}:{}" .format (url .hostname , url .port ), path = "" )
327327
328328 client = Minio (
@@ -333,16 +333,18 @@ def minio_uri():
333333 )
334334
335335 # Reset the state of the bucket after each test.
336- if client .bucket_exists (bucket ):
336+ if client .bucket_exists (bucket_name = bucket_name ):
337337 delete_object_list = map (
338- lambda x : DeleteObject (x .object_name ),
339- client .list_objects (bucket , recursive = True ),
338+ lambda x : DeleteObject (object_name = x .object_name ),
339+ client .list_objects (bucket_name = bucket_name , recursive = True ),
340+ )
341+ errors = client .remove_objects (
342+ bucket_name = bucket_name , delete_object_list = delete_object_list
340343 )
341- errors = client .remove_objects (bucket , delete_object_list )
342344 for error in errors :
343345 print ("error occurred when deleting object" , error )
344346 else :
345- client .make_bucket (bucket_name = bucket )
347+ client .make_bucket (bucket_name = bucket_name )
346348
347349 else :
348350 raise pytest .skip ("No TILED_TEST_BUCKET configured" )
0 commit comments