mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
List elements when a project is closed
This commit is contained in:
1 parent
a27db6b4eb
commit
5092bd2fdf
8 files changed
+43
-4
No files matched your search
@@ -94,6 +94,12 @@ async def test_all_drawings(app: FastAPI, client: AsyncClient, project: Project)
|
||||
assert response.status_code == status.HTTP_200_OK
|
||||
assert len(response.json()) == 1
|
||||
|
||||
# test listing links from a closed project
|
||||
await project.close(ignore_notification=True)
|
||||
response = await client.get(app.url_path_for("get_drawings", project_id=project.id))
|
||||
assert response.status_code == status.HTTP_200_OK
|
||||
assert len(response.json()) == 1
|
||||
|
||||
|
||||
async def test_delete_drawing(app: FastAPI, client: AsyncClient, project: Project) -> None:
|
||||
|
||||
|
||||
@@ -305,6 +305,13 @@ async def test_list_link(app: FastAPI, client: AsyncClient, project: Project, no
|
||||
assert len(response.json()) == 1
|
||||
assert response.json()[0]["filters"] == filters
|
||||
|
||||
# test listing links from a closed project
|
||||
await project.close(ignore_notification=True)
|
||||
response = await client.get(app.url_path_for("get_links", project_id=project.id))
|
||||
assert response.status_code == status.HTTP_200_OK
|
||||
assert len(response.json()) == 1
|
||||
assert response.json()[0]["filters"] == filters
|
||||
|
||||
|
||||
async def test_reset_link(app: FastAPI, client: AsyncClient, project: Project) -> None:
|
||||
|
||||
|
||||
@@ -78,6 +78,12 @@ async def test_list_node(app: FastAPI, client: AsyncClient, project: Project, co
|
||||
assert response.status_code == status.HTTP_200_OK
|
||||
assert response.json()[0]["name"] == "test"
|
||||
|
||||
# test listing nodes from a closed project
|
||||
await project.close(ignore_notification=True)
|
||||
response = await client.get(app.url_path_for("get_nodes", project_id=project.id))
|
||||
assert response.status_code == status.HTTP_200_OK
|
||||
assert response.json()[0]["name"] == "test"
|
||||
|
||||
|
||||
async def test_get_node(app: FastAPI, client: AsyncClient, project: Project, compute: Compute) -> None:
|
||||
|
||||
|
||||
Reference in new issue
Block a user