mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02: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:
1 parent
f3b4cc0160
commit
0f496907a0
354 files changed
+9950
-10181
No files matched your search
@@ -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