mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-06 07:11:13 +02:00
Support of supplier and variables in topology
This commit is contained in:
1 parent
e4436096c2
commit
f2700ed445
4 files changed
+92
No files matched your search
@@ -104,6 +104,20 @@ def test_update_project(http_controller):
|
||||
assert response.json["name"] == "test2"
|
||||
|
||||
|
||||
def test_update_project_with_variables(http_controller):
|
||||
variables = [
|
||||
{"name": "TEST1"},
|
||||
{"name": "TEST2", "value": "value1"}
|
||||
]
|
||||
query = {"name": "test", "project_id": "10010203-0405-0607-0809-0a0b0c0d0e0f", "variables": variables}
|
||||
response = http_controller.post("/projects", query)
|
||||
assert response.status == 201
|
||||
query = {"name": "test2"}
|
||||
response = http_controller.put("/projects/10010203-0405-0607-0809-0a0b0c0d0e0f", query, example=True)
|
||||
assert response.status == 200
|
||||
assert response.json["variables"] == variables
|
||||
|
||||
|
||||
def test_list_projects(http_controller, tmpdir):
|
||||
http_controller.post("/projects", {"name": "test", "path": str(tmpdir), "project_id": "00010203-0405-0607-0809-0a0b0c0d0e0f"})
|
||||
response = http_controller.get("/projects", example=True)
|
||||
|
||||
Reference in new issue
Block a user