Skip to content

Commit 93ae176

Browse files
committed
drafting tests
1 parent 88231cd commit 93ae176

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

services/web/server/tests/unit/with_dbs/03/test_trash.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import pytest
1515
from aiohttp.test_utils import TestClient
1616
from aioresponses import aioresponses
17+
from models_library.api_schemas_webserver.folders import FolderGet
1718
from models_library.api_schemas_webserver.projects import ProjectGet, ProjectListItem
1819
from models_library.rest_pagination import Page
1920
from pytest_mock import MockerFixture
@@ -174,3 +175,27 @@ async def test_trash_projects( # noqa: PLR0915
174175
await asyncio.sleep(0.1)
175176
mock_stop_pipeline.assert_awaited()
176177
mock_remove_dynamic_services.assert_awaited()
178+
179+
180+
@pytest.mark.acceptance_test(
181+
"For https://github.com/ITISFoundation/osparc-simcore/pull/6642"
182+
)
183+
async def test_trash_folders(
184+
client: TestClient,
185+
logged_user: UserInfoDict,
186+
):
187+
188+
# LIST NOT trashed
189+
resp = await client.get("/v0/folders")
190+
await assert_status(resp, status.HTTP_200_OK)
191+
192+
page = Page[FolderGet].parse_obj(await resp.json())
193+
assert page.meta.total == 1
194+
195+
got = page.data[0]
196+
# assert got.uuid == project_uuid
197+
assert got.trashed_at is None
198+
199+
# LIST trashed
200+
resp = await client.get("/v0/folders", params={"filters": '{"trashed": true}'})
201+
await assert_status(resp, status.HTTP_200_OK)

0 commit comments

Comments
 (0)