mirror of
https://github.com/GNS3/gns3-server
synced 2024-12-26 16:58:28 +00:00
Fix tests broken by a previous commit
This commit is contained in:
parent
343e007809
commit
3926390d30
@ -305,4 +305,4 @@ class IOUHandler:
|
|||||||
vm = iou_manager.get_vm(request.match_info["vm_id"],
|
vm = iou_manager.get_vm(request.match_info["vm_id"],
|
||||||
project_id=request.match_info["project_id"])
|
project_id=request.match_info["project_id"])
|
||||||
response.set_status(200)
|
response.set_status(200)
|
||||||
response.json({"content": vm.initial_config})
|
response.json({"content": vm.initial_config_content})
|
||||||
|
@ -81,11 +81,11 @@ def test_vm(project, manager):
|
|||||||
assert vm.id == "00010203-0405-0607-0809-0a0b0c0d0e0f"
|
assert vm.id == "00010203-0405-0607-0809-0a0b0c0d0e0f"
|
||||||
|
|
||||||
|
|
||||||
def test_vm_initial_config(project, manager):
|
def test_vm_initial_config_content(project, manager):
|
||||||
vm = IOUVM("test", "00010203-0405-0607-0808-0a0b0c0d0e0f", project, manager)
|
vm = IOUVM("test", "00010203-0405-0607-0808-0a0b0c0d0e0f", project, manager)
|
||||||
vm.initial_config = "hostname %h"
|
vm.initial_config_content = "hostname %h"
|
||||||
assert vm.name == "test"
|
assert vm.name == "test"
|
||||||
assert vm.initial_config == "hostname test"
|
assert vm.initial_config_content == "hostname test"
|
||||||
assert vm.id == "00010203-0405-0607-0808-0a0b0c0d0e0f"
|
assert vm.id == "00010203-0405-0607-0808-0a0b0c0d0e0f"
|
||||||
|
|
||||||
|
|
||||||
@ -287,10 +287,10 @@ def test_update_initial_config_empty(vm):
|
|||||||
assert f.read() == content
|
assert f.read() == content
|
||||||
|
|
||||||
|
|
||||||
def test_update_initial_config_h(vm):
|
def test_update_initial_config_content_hostname(vm):
|
||||||
content = "hostname %h\n"
|
content = "hostname %h\n"
|
||||||
vm.name = "pc1"
|
vm.name = "pc1"
|
||||||
vm.initial_config = content
|
vm.initial_config_content = content
|
||||||
with open(vm.initial_config_file) as f:
|
with open(vm.initial_config_file) as f:
|
||||||
assert f.read() == "hostname pc1\n"
|
assert f.read() == "hostname pc1\n"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user