mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-18 06:18:08 +00:00
Fix appliance template tests.
This commit is contained in:
parent
5958a23557
commit
651d8280a7
@ -490,7 +490,7 @@ def test_appliance_templates(controller, async_run, tmpdir):
|
|||||||
json.dump(my_appliance, f)
|
json.dump(my_appliance, f)
|
||||||
|
|
||||||
with patch("gns3server.config.Config.get_section_config", return_value={"appliances_path": str(tmpdir)}):
|
with patch("gns3server.config.Config.get_section_config", return_value={"appliances_path": str(tmpdir)}):
|
||||||
controller.load_appliances()
|
controller.load_appliance_templates()
|
||||||
assert len(controller.appliance_templates) > 0
|
assert len(controller.appliance_templates) > 0
|
||||||
for appliance in controller.appliance_templates.values():
|
for appliance in controller.appliance_templates.values():
|
||||||
assert appliance.__json__()["status"] != "broken"
|
assert appliance.__json__()["status"] != "broken"
|
||||||
|
@ -60,7 +60,7 @@ def test_appliance_list(http_controller, controller):
|
|||||||
|
|
||||||
def test_appliance_templates_list(http_controller, controller, async_run):
|
def test_appliance_templates_list(http_controller, controller, async_run):
|
||||||
|
|
||||||
controller.load_appliances()
|
controller.load_appliance_templates()
|
||||||
response = http_controller.get("/appliances/templates", example=True)
|
response = http_controller.get("/appliances/templates", example=True)
|
||||||
assert response.status == 200
|
assert response.status == 200
|
||||||
assert len(response.json) > 0
|
assert len(response.json) > 0
|
||||||
|
Loading…
Reference in New Issue
Block a user