Skip to content

Commit f1596ca

Browse files
committed
fix test
1 parent 67ce675 commit f1596ca

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

services/storage/tests/unit/test_db_data_export.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
from simcore_service_storage.api.rpc._async_jobs import AsyncJobNameData
3232
from simcore_service_storage.api.rpc._data_export import AccessRightError
3333
from simcore_service_storage.core.settings import ApplicationSettings
34+
from simcore_service_storage.simcore_s3_dsm import SimcoreS3DataManager
3435

3536
pytest_plugins = [
3637
"pytest_simcore.rabbit_service",
@@ -86,6 +87,12 @@ class UserWithFile(NamedTuple):
8687
file: Path
8788

8889

90+
@pytest.mark.parametrize(
91+
"location_id",
92+
[SimcoreS3DataManager.get_location_id()],
93+
ids=[SimcoreS3DataManager.get_location_name()],
94+
indirect=True,
95+
)
8996
@pytest.mark.parametrize(
9097
"project_params,_type",
9198
[
@@ -117,10 +124,9 @@ async def test_start_data_export_success(
117124
user_id: UserID,
118125
_type: Literal["file", "folder"],
119126
):
120-
121127
_, list_of_files = with_random_project_with_files
122128
workspace_files = [
123-
p for p in list(list_of_files.values())[0].keys() if "/workspace/" in p
129+
p for p in next(iter(list_of_files.values())) if "/workspace/" in p
124130
]
125131
assert len(workspace_files) > 0
126132
file_or_folder_id: SimcoreS3FileID
@@ -152,7 +158,6 @@ async def test_start_data_export_success(
152158
async def test_start_data_export_fail(
153159
rpc_client: RabbitMQRPCClient, user_id: UserID, faker: Faker
154160
):
155-
156161
with pytest.raises(AccessRightError):
157162
_ = await async_jobs.submit_job(
158163
rpc_client,

0 commit comments

Comments
 (0)