|
|
|
@ -55,15 +55,13 @@ def test_create_project_with_uuid(server):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_show_project(server):
|
|
|
|
|
query = {"project_id": "00010203-0405-0607-0809-0a0b0c0d0e0f", "path": "/tmp", "temporary": False}
|
|
|
|
|
with patch("gns3server.config.Config.get_section_config", return_value={"local": True}):
|
|
|
|
|
response = server.post("/projects", query)
|
|
|
|
|
assert response.status == 200
|
|
|
|
|
query = {"project_id": "00010203-0405-0607-0809-0a0b0c0d0e0f", "temporary": False}
|
|
|
|
|
response = server.post("/projects", query)
|
|
|
|
|
assert response.status == 200
|
|
|
|
|
response = server.get("/projects/00010203-0405-0607-0809-0a0b0c0d0e0f", example=True)
|
|
|
|
|
assert len(response.json.keys()) == 4
|
|
|
|
|
assert len(response.json["location"]) > 0
|
|
|
|
|
assert response.json["project_id"] == "00010203-0405-0607-0809-0a0b0c0d0e0f"
|
|
|
|
|
assert response.json["path"] == "/tmp"
|
|
|
|
|
assert response.json["temporary"] is False
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|