mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 14:01:15 +02:00
Return platform value on appliances list (Fixes #2211)
This commit is contained in:
1 parent
fc9d44011b
commit
3fd86f5807
2 files changed
+34
-5
No files matched your search
@@ -25,7 +25,8 @@ def test_appliance_json():
|
||||
"default_name_format": "{name}-{0}",
|
||||
"category": 0,
|
||||
"symbol": "qemu.svg",
|
||||
"server": "local"
|
||||
"server": "local",
|
||||
"platform": None
|
||||
})
|
||||
assert a.__json__() == {
|
||||
"appliance_id": a.id,
|
||||
@@ -35,7 +36,8 @@ def test_appliance_json():
|
||||
"default_name_format": "{name}-{0}",
|
||||
"category": "router",
|
||||
"symbol": "qemu.svg",
|
||||
"compute_id": "local"
|
||||
"compute_id": "local",
|
||||
"platform": None
|
||||
}
|
||||
|
||||
|
||||
@@ -46,7 +48,8 @@ def test_appliance_json_with_not_known_category():
|
||||
"default_name_format": "{name}-{0}",
|
||||
"category": 'Not known',
|
||||
"symbol": "qemu.svg",
|
||||
"server": "local"
|
||||
"server": "local",
|
||||
"platform": None
|
||||
})
|
||||
assert a.__json__() == {
|
||||
"appliance_id": a.id,
|
||||
@@ -56,7 +59,31 @@ def test_appliance_json_with_not_known_category():
|
||||
"default_name_format": "{name}-{0}",
|
||||
"category": "Not known",
|
||||
"symbol": "qemu.svg",
|
||||
"compute_id": "local"
|
||||
"compute_id": "local",
|
||||
"platform": None
|
||||
}
|
||||
|
||||
|
||||
def test_appliance_json_with_platform():
|
||||
a = Appliance(None, {
|
||||
"node_type": "dynamips",
|
||||
"name": "Test",
|
||||
"default_name_format": "{name}-{0}",
|
||||
"category": 0,
|
||||
"symbol": "dynamips.svg",
|
||||
"server": "local",
|
||||
"platform": "c3725"
|
||||
})
|
||||
assert a.__json__() == {
|
||||
"appliance_id": a.id,
|
||||
"node_type": "dynamips",
|
||||
"builtin": False,
|
||||
"name": "Test",
|
||||
"default_name_format": "{name}-{0}",
|
||||
"category": "router",
|
||||
"symbol": "dynamips.svg",
|
||||
"compute_id": "local",
|
||||
"platform": "c3725"
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user