@@ -1387,14 +1387,18 @@ async def test_upload_file_is_directory_and_remove_content(
13871387 )
13881388 assert len (list_of_files ) == SUBDIR_COUNT * FILE_COUNT
13891389
1390- # DELETE ONE FILE FROM THE DIRECTORY
1390+ # DELETE NOT EXISTING
13911391
13921392 assert client .app
1393+
13931394 delete_url = (
13941395 client .app .router ["delete_file" ]
13951396 .url_for (
13961397 location_id = f"{ location_id } " ,
1397- file_id = urllib .parse .quote (list_of_files [0 ].file_id , safe = "" ),
1398+ file_id = urllib .parse .quote (
1399+ "/" .join (list_of_files [0 ].file_id .split ("/" )[:2 ]) + "/does_not_exist" ,
1400+ safe = "" ,
1401+ ),
13981402 )
13991403 .with_query (user_id = user_id )
14001404 )
@@ -1406,17 +1410,16 @@ async def test_upload_file_is_directory_and_remove_content(
14061410 client , user_id , location_id , directory_file_upload
14071411 )
14081412
1409- assert len (list_of_files ) == SUBDIR_COUNT * FILE_COUNT - 1
1413+ assert len (list_of_files ) == SUBDIR_COUNT * FILE_COUNT
14101414
1411- # DELETE NOT EXISTING
1415+ # DELETE ONE FILE FROM THE DIRECTORY
1416+
1417+ assert client .app
14121418 delete_url = (
14131419 client .app .router ["delete_file" ]
14141420 .url_for (
14151421 location_id = f"{ location_id } " ,
1416- file_id = urllib .parse .quote (
1417- "/" .join (list_of_files [0 ].file_id .split ("/" )[:2 ]) + "/does_not_exist" ,
1418- safe = "" ,
1419- ),
1422+ file_id = urllib .parse .quote (list_of_files [0 ].file_id , safe = "" ),
14201423 )
14211424 .with_query (user_id = user_id )
14221425 )
@@ -1428,6 +1431,8 @@ async def test_upload_file_is_directory_and_remove_content(
14281431 client , user_id , location_id , directory_file_upload
14291432 )
14301433
1434+ assert len (list_of_files ) == SUBDIR_COUNT * FILE_COUNT - 1
1435+
14311436 # DIRECTORY REMOVAL
14321437
14331438 await delete_directory (directory_file_upload = directory_file_upload )
0 commit comments