mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-06-21 16:39:40 +00:00
Fix API status code for start/stop/suspend/reload a node. Fixes #1353.
Fix issues with test. Update documentation.
This commit is contained in:
@ -164,7 +164,7 @@ def test_start_node(http_controller, tmpdir, project, compute, node):
|
||||
compute.post = AsyncioMagicMock()
|
||||
|
||||
response = http_controller.post("/projects/{}/nodes/{}/start".format(project.id, node.id), example=True)
|
||||
assert response.status == 201
|
||||
assert response.status == 200
|
||||
assert response.json == node.__json__()
|
||||
|
||||
|
||||
@ -173,7 +173,7 @@ def test_stop_node(http_controller, tmpdir, project, compute, node):
|
||||
compute.post = AsyncioMagicMock()
|
||||
|
||||
response = http_controller.post("/projects/{}/nodes/{}/stop".format(project.id, node.id), example=True)
|
||||
assert response.status == 201
|
||||
assert response.status == 200
|
||||
assert response.json == node.__json__()
|
||||
|
||||
|
||||
@ -182,7 +182,7 @@ def test_suspend_node(http_controller, tmpdir, project, compute, node):
|
||||
compute.post = AsyncioMagicMock()
|
||||
|
||||
response = http_controller.post("/projects/{}/nodes/{}/suspend".format(project.id, node.id), example=True)
|
||||
assert response.status == 201
|
||||
assert response.status == 200
|
||||
assert response.json == node.__json__()
|
||||
|
||||
|
||||
@ -191,7 +191,7 @@ def test_reload_node(http_controller, tmpdir, project, compute, node):
|
||||
compute.post = AsyncioMagicMock()
|
||||
|
||||
response = http_controller.post("/projects/{}/nodes/{}/reload".format(project.id, node.id), example=True)
|
||||
assert response.status == 201
|
||||
assert response.status == 200
|
||||
assert response.json == node.__json__()
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user