@@ -64,7 +64,7 @@ def test_upload(client):
6464 # Upload all the files we downloaded earlier
6565 dled_files = os .listdir ('downloads' )
6666
67- for count , fn in enumerate (dled_files ):
67+ for count , fn in enumerate (dled_files , start = 1 ):
6868 print ("Uploading {}" .format (fn ))
6969 abs_path = os .path .join (os .curdir , 'downloads' , fn )
7070 filesize = os .path .getsize (abs_path )
@@ -82,13 +82,13 @@ def test_upload(client):
8282 with open (abs_path , "rb" ) as ul_file :
8383 client .upload (asset , ul_file )
8484
85- print ("Done uploading file {} of {}" .format ((count + 1 ), len (dled_files )))
85+ print ("Done uploading file {} of {}" .format ((count ), len (dled_files )))
8686
8787 print ("Sleeping for 5 seconds to allow uploads to finish..." )
8888 time .sleep (5 )
8989
9090 print ("Continuing..." )
91-
91+
9292 return new_parent_id
9393
9494# Flatten asset children and pull out important info for comparison
@@ -162,11 +162,11 @@ def clean_up(client, asset_to_delete):
162162 ]
163163 }
164164
165- try :
166- client ._api_call ('delete' , '/batch/ assets' , json .dumps (payload ))
167- print ("Managed to cleanup!" )
168- except Exception as e :
169- print (e )
165+ # try:
166+ # client._api_call('delete', '/assets/id ', json.dumps(payload))
167+ # print("Managed to cleanup!")
168+ # except Exception as e:
169+ # print(e)
170170
171171 return True
172172
0 commit comments