File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
services/web/server/tests/unit/with_dbs/03 Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change 1414import pytest
1515from aiohttp .test_utils import TestClient
1616from aioresponses import aioresponses
17+ from models_library .api_schemas_webserver .folders import FolderGet
1718from models_library .api_schemas_webserver .projects import ProjectGet , ProjectListItem
1819from models_library .rest_pagination import Page
1920from 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 )
You can’t perform that action at this time.
0 commit comments