Skip to content

Commit 949cb09

Browse files
author
Andrei Neagu
committed
refactor
1 parent 1cd7bbd commit 949cb09

File tree

3 files changed

+18
-42
lines changed

3 files changed

+18
-42
lines changed

services/storage/tests/unit/test__worker_tasks_paths.py renamed to services/storage/tests/unit/test_api__worker_tasks__paths.py

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,15 @@
2020
from models_library.users import UserID
2121
from pydantic import ByteSize, TypeAdapter
2222
from pytest_simcore.helpers.storage_utils import FileIDDict, ProjectWithFilesParams
23+
from simcore_service_storage.api._worker_tasks._data_export import data_export
2324
from simcore_service_storage.api._worker_tasks._paths import compute_path_size
2425
from simcore_service_storage.modules.celery.utils import set_fastapi_app
2526
from simcore_service_storage.simcore_s3_dsm import SimcoreS3DataManager
2627

27-
pytest_simcore_core_services_selection = ["postgres"]
28+
pytest_simcore_core_services_selection = [
29+
"postgres",
30+
"rabbit",
31+
]
2832
pytest_simcore_ops_services_selection = ["adminer"]
2933

3034
_IsFile: TypeAlias = bool
@@ -214,3 +218,15 @@ async def test_path_compute_size_inexistent_path(
214218
path=Path(faker.file_path(absolute=False)),
215219
expected_total_size=0,
216220
)
221+
222+
223+
# TODO: refactor and extract common parts
224+
async def test_data_export(
225+
fake_celery_task: Task,
226+
initialized_app: FastAPI,
227+
client: httpx.AsyncClient,
228+
user_id: UserID,
229+
):
230+
# TODO: fake celery_worker_client as well
231+
data = await data_export(fake_celery_task, user_id=user_id, paths_to_export=[])
232+
assert data == "alskdjalsdjasjkd"

services/storage/tests/unit/test_api_celery__tqdm_utils.py renamed to services/storage/tests/unit/test_api__worker_tasks__tqdm_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from time import sleep
22

3-
from simcore_service_storage.api.celery._tqdm_utils import (
3+
from simcore_service_storage.api._worker_tasks._tqdm_utils import (
44
get_export_progress,
55
set_absolute_progress,
66
)

services/storage/tests/unit/test_api_celery__export_task.py

Lines changed: 0 additions & 40 deletions
This file was deleted.

0 commit comments

Comments
 (0)