Skip to content

Commit cab5b55

Browse files
fix test
1 parent 1926198 commit cab5b55

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

services/storage/src/simcore_service_storage/simcore_s3_dsm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,7 @@ async def search_owned_files(
752752
),
753753
file_id_prefix=file_id_prefix,
754754
partial_file_id=None,
755-
only_files=True,
755+
is_directory=False,
756756
sha256_checksum=sha256_checksum,
757757
limit=limit,
758758
offset=offset,

services/storage/tests/unit/test_handlers_files.py

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)