Skip to content

Commit c6cb9fc

Browse files
review @pcrespov
1 parent dace0de commit c6cb9fc

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

services/web/server/tests/unit/with_dbs/04/workspaces/test_workspaces__delete_workspace_with_content.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,34 @@ async def test_workspaces_full_workflow_deletion(
138138
resp = await client.put(f"{url}")
139139
await assert_status(resp, status.HTTP_204_NO_CONTENT)
140140

141+
# ---------------------
142+
# TESTING DELETION
143+
# ---------------------
144+
141145
# Delete workspace
142146
url = client.app.router["delete_workspace"].url_for(
143147
workspace_id=f"{added_workspace.workspace_id}"
144148
)
145149
resp = await client.delete(f"{url}")
146150
await assert_status(resp, status.HTTP_204_NO_CONTENT)
151+
152+
# ---------------------
153+
# Assertions
154+
155+
resp = await client.get(f"/v0/workspaces/{added_workspace.workspace_id}")
156+
await assert_status(resp, status.HTTP_403_FORBIDDEN)
157+
158+
resp = await client.get(f"/v0/folders/{first_folder['folderId']}")
159+
await assert_status(resp, status.HTTP_403_FORBIDDEN)
160+
161+
resp = await client.get(f"/v0/folders/{second_folder['folderId']}")
162+
await assert_status(resp, status.HTTP_403_FORBIDDEN)
163+
164+
resp = await client.get(f"/v0/projects/{first_project['uuid']}")
165+
await assert_status(resp, status.HTTP_404_NOT_FOUND)
166+
167+
resp = await client.get(f"/v0/projects/{second_project['uuid']}")
168+
await assert_status(resp, status.HTTP_404_NOT_FOUND)
169+
170+
resp = await client.get(f"/v0/projects/{third_project['uuid']}")
171+
await assert_status(resp, status.HTTP_404_NOT_FOUND)

0 commit comments

Comments
 (0)