mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Fix dynamips node creation error
This commit is contained in:
2 files changed
+20
-2
No files matched your search
@@ -83,7 +83,7 @@ def test_name(compute, project):
|
||||
|
||||
def test_vmname(compute, project):
|
||||
"""
|
||||
Additionnal properties should add to the properties
|
||||
Additionnal properties should be add to the properties
|
||||
field
|
||||
"""
|
||||
node = Node(project, compute, "PC",
|
||||
@@ -93,6 +93,23 @@ def test_vmname(compute, project):
|
||||
assert node.properties["vmname"] == "test"
|
||||
|
||||
|
||||
def test_empty_properties(compute, project):
|
||||
"""
|
||||
Empty properties need to be ignored
|
||||
"""
|
||||
node = Node(project, compute, "PC",
|
||||
node_id=str(uuid.uuid4()),
|
||||
node_type="virtualbox",
|
||||
aa="",
|
||||
bb=None,
|
||||
category=2,
|
||||
cc="xx")
|
||||
assert "aa" not in node.properties
|
||||
assert "bb" not in node.properties
|
||||
assert "cc" in node.properties
|
||||
assert "category" not in node.properties # Controller only
|
||||
|
||||
|
||||
def test_eq(compute, project, node, controller):
|
||||
assert node == Node(project, compute, "demo1", node_id=node.id, node_type="qemu")
|
||||
assert node != "a"
|
||||
|
||||
Reference in new issue
Block a user