mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-01-31 05:13:49 +02:00
No project for qemu binaries list
This commit is contained in:
parent
8aa5514890
commit
15036837bb
@ -262,10 +262,7 @@ class QEMUHandler:
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@Route.get(
|
@Route.get(
|
||||||
r"/projects/{project_id}/qemu/binaries",
|
r"/qemu/binaries",
|
||||||
parameters={
|
|
||||||
"project_id": "UUID for the project"
|
|
||||||
},
|
|
||||||
status_codes={
|
status_codes={
|
||||||
200: "Success",
|
200: "Success",
|
||||||
400: "Invalid request",
|
400: "Invalid request",
|
||||||
|
@ -161,7 +161,7 @@ def test_qemu_list_binaries(server, vm):
|
|||||||
ret = [{"path": "/tmp/1", "version": "2.2.0"},
|
ret = [{"path": "/tmp/1", "version": "2.2.0"},
|
||||||
{"path": "/tmp/2", "version": "2.1.0"}]
|
{"path": "/tmp/2", "version": "2.1.0"}]
|
||||||
with asyncio_patch("gns3server.modules.qemu.Qemu.binary_list", return_value=ret) as mock:
|
with asyncio_patch("gns3server.modules.qemu.Qemu.binary_list", return_value=ret) as mock:
|
||||||
response = server.get("/projects/{project_id}/qemu/binaries".format(project_id=vm["project_id"]))
|
response = server.get("/qemu/binaries".format(project_id=vm["project_id"]))
|
||||||
assert mock.called
|
assert mock.called
|
||||||
assert response.status == 200
|
assert response.status == 200
|
||||||
assert response.json == ret
|
assert response.json == ret
|
||||||
|
Loading…
Reference in New Issue
Block a user