Use generic symbol names

This commit is contained in:
grossmj
2022-07-25 12:33:40 +02:00
parent b7f4a4cbda
commit bfbac2e93a
15 changed files with 70 additions and 44 deletions

View File

@ -18,6 +18,7 @@
import os
import pytest
import uuid
import unittest.mock
from pathlib import Path
from fastapi import FastAPI, status
@ -313,7 +314,7 @@ class TestDynamipsTemplate:
"ram": 512,
"sparsemem": True,
"startup_config": "ios_base_startup-config.txt",
"symbol": ":/symbols/router.svg",
"symbol": unittest.mock.ANY,
"system_id": "FTX0945W0MY"}
for item, value in expected_response.items():
@ -358,7 +359,7 @@ class TestDynamipsTemplate:
"ram": 256,
"sparsemem": True,
"startup_config": "ios_base_startup-config.txt",
"symbol": ":/symbols/router.svg",
"symbol": unittest.mock.ANY,
"system_id": "FTX0945W0MY"}
for item, value in expected_response.items():
@ -403,7 +404,7 @@ class TestDynamipsTemplate:
"ram": 128,
"sparsemem": True,
"startup_config": "ios_base_startup-config.txt",
"symbol": ":/symbols/router.svg",
"symbol": unittest.mock.ANY,
"system_id": "FTX0945W0MY"}
for item, value in expected_response.items():
@ -450,7 +451,7 @@ class TestDynamipsTemplate:
"ram": 192,
"sparsemem": True,
"startup_config": "ios_base_startup-config.txt",
"symbol": ":/symbols/router.svg",
"symbol": unittest.mock.ANY,
"system_id": "FTX0945W0MY"}
for item, value in expected_response.items():
@ -507,7 +508,7 @@ class TestDynamipsTemplate:
"ram": 192,
"sparsemem": True,
"startup_config": "ios_base_startup-config.txt",
"symbol": ":/symbols/router.svg",
"symbol": unittest.mock.ANY,
"system_id": "FTX0945W0MY"}
for item, value in expected_response.items():
@ -554,7 +555,7 @@ class TestDynamipsTemplate:
"ram": 160,
"sparsemem": True,
"startup_config": "ios_base_startup-config.txt",
"symbol": ":/symbols/router.svg",
"symbol": unittest.mock.ANY,
"system_id": "FTX0945W0MY"}
for item, value in expected_response.items():
@ -613,7 +614,7 @@ class TestDynamipsTemplate:
"ram": 160,
"sparsemem": False,
"startup_config": "ios_base_startup-config.txt",
"symbol": ":/symbols/router.svg",
"symbol": unittest.mock.ANY,
"system_id": "FTX0945W0MY"}
for item, value in expected_response.items():
@ -674,7 +675,7 @@ class TestIOUTemplate:
"ram": 256,
"serial_adapters": 2,
"startup_config": "iou_l3_base_startup-config.txt",
"symbol": ":/symbols/multilayer_switch.svg",
"symbol": unittest.mock.ANY,
"use_default_iou_values": True,
"l1_keepalives": False}
@ -711,7 +712,7 @@ class TestDockerTemplate:
"image": "gns3/endhost:latest",
"name": "Docker template",
"start_command": "",
"symbol": ":/symbols/docker_guest.svg",
"symbol": unittest.mock.ANY,
"custom_adapters": []}
for item, value in expected_response.items():
@ -772,7 +773,7 @@ class TestQemuTemplate:
"process_priority": "normal",
"qemu_path": "",
"ram": 512,
"symbol": ":/symbols/qemu_guest.svg",
"symbol": unittest.mock.ANY,
"usage": "",
"custom_adapters": []}
@ -810,7 +811,7 @@ class TestVMwareTemplate:
"on_close": "power_off",
"port_name_format": "Ethernet{0}",
"port_segment_size": 0,
"symbol": ":/symbols/vmware_guest.svg",
"symbol": unittest.mock.ANY,
"use_any_adapter": False,
"vmx_path": vmx_path,
"custom_adapters": []}
@ -849,7 +850,7 @@ class TestVirtualBoxTemplate:
"port_name_format": "Ethernet{0}",
"port_segment_size": 0,
"ram": 256,
"symbol": ":/symbols/vbox_guest.svg",
"symbol": unittest.mock.ANY,
"use_any_adapter": False,
"vmname": "My VirtualBox VM",
"custom_adapters": []}
@ -879,7 +880,7 @@ class TestVPCSTemplate:
"console_type": "telnet",
"default_name_format": "PC{0}",
"name": "VPCS template",
"symbol": ":/symbols/vpcs_guest.svg"}
"symbol": unittest.mock.ANY}
for item, value in expected_response.items():
assert response.json().get(item) == value
@ -952,7 +953,7 @@ class TestEthernetSwitchTemplate:
"type": "access",
"vlan": 1
}],
"symbol": ":/symbols/ethernet_switch.svg"}
"symbol": unittest.mock.ANY}
for item, value in expected_response.items():
assert response.json().get(item) == value
@ -995,7 +996,7 @@ class TestHubTemplate:
}],
"compute_id": "local",
"name": "Ethernet hub template",
"symbol": ":/symbols/hub.svg",
"symbol": unittest.mock.ANY,
"default_name_format": "Hub{0}",
"template_type": "ethernet_hub",
"category": "switch",
@ -1024,7 +1025,7 @@ class TestCloudTemplate:
"default_name_format": "Cloud{0}",
"name": "Cloud template",
"ports_mapping": [],
"symbol": ":/symbols/cloud.svg",
"symbol": unittest.mock.ANY,
"remote_console_host": "127.0.0.1",
"remote_console_port": 23,
"remote_console_type": "none",