Skip to content

Commit 896f2bc

Browse files
committed
cleanup
1 parent adb6359 commit 896f2bc

File tree

3 files changed

+1
-48
lines changed

3 files changed

+1
-48
lines changed

services/web/server/tests/unit/with_dbs/02/test_projects_repository.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ async def test_batch_get_trashed_by_primary_gid(
179179
client.app,
180180
projects_uuids=[
181181
trashed_project.uuid,
182-
non_existent_project_uuid, # invalid
182+
non_existent_project_uuid, # non-existent
183183
trashed_project.uuid, # repeated
184184
],
185185
)

services/web/server/tests/unit/with_dbs/02/test_projects_service_delete.py

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

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

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
from uuid import UUID, uuid5
1414

1515
import aiopg.sa
16-
import arrow
1716
import pytest
1817
import sqlalchemy as sa
1918
from aiohttp.test_utils import TestClient
@@ -32,9 +31,6 @@
3231
from simcore_postgres_database.utils_projects_nodes import ProjectNodesRepo
3332
from simcore_service_webserver.projects._db_utils import PermissionStr
3433
from simcore_service_webserver.projects._groups_db import update_or_insert_project_group
35-
from simcore_service_webserver.projects._projects_db import (
36-
batch_get_trashed_by_primary_gid,
37-
)
3834
from simcore_service_webserver.projects.api import has_user_project_access_rights
3935
from simcore_service_webserver.projects.db import ProjectAccessRights, ProjectDBAPI
4036
from simcore_service_webserver.projects.exceptions import (
@@ -966,42 +962,3 @@ async def test_check_project_node_has_all_required_inputs_ok(
966962
project_uuid=UUID(inserted_project["uuid"]),
967963
node_id=UUID("324d6ef2-a82c-414d-9001-dc84da1cbea3"),
968964
)
969-
970-
971-
@pytest.mark.parametrize(
972-
"user_role",
973-
[UserRole.USER],
974-
)
975-
async def test_batch_get_trashed_by_primary_gid(
976-
client: TestClient,
977-
logged_user: UserInfoDict,
978-
insert_project_in_db: Callable[..., Awaitable[dict[str, Any]]],
979-
fake_project: ProjectDict,
980-
):
981-
assert client.app
982-
983-
# Insert two different projects
984-
fake_project_1 = deepcopy(fake_project)
985-
fake_project_1["trashed_by"] = logged_user["id"]
986-
fake_project_1["trashed"] = arrow.now().datetime
987-
fake_project_1["trashed_explicitly"] = True
988-
989-
project_1 = await insert_project_in_db(fake_project_1, user_id=logged_user["id"])
990-
project_2 = await insert_project_in_db(fake_project, user_id=logged_user["id"])
991-
992-
# Test with two different project UUIDs
993-
trashed_by_primary_gid = await batch_get_trashed_by_primary_gid(
994-
client.app,
995-
projects_uuids=[project_1["uuid"], project_2["uuid"]],
996-
)
997-
assert trashed_by_primary_gid == [logged_user["primary_gid"], None]
998-
999-
# Test with two identical project UUIDs
1000-
trashed_by_primary_gid = await batch_get_trashed_by_primary_gid(
1001-
client.app,
1002-
projects_uuids=[project_1["uuid"], project_1["uuid"]],
1003-
)
1004-
assert trashed_by_primary_gid == [
1005-
logged_user["primary_gid"],
1006-
logged_user["primary_gid"],
1007-
]

0 commit comments

Comments
 (0)