mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-19 04:35:14 +02:00
Migration to FastAPI
This commit is contained in:
1 parent
c12b675691
commit
eb3cb8a41f
224 files changed
+11254
-13517
No files matched your search
@@ -47,7 +47,8 @@ def dummy_gns3vm(controller, dummy_engine):
|
||||
return vm
|
||||
|
||||
|
||||
async def test_list(loop, controller):
|
||||
@pytest.mark.asyncio
|
||||
async def test_list(controller):
|
||||
|
||||
vm = GNS3VM(controller)
|
||||
with asyncio_patch("gns3server.controller.gns3vm.vmware_gns3_vm.VMwareGNS3VM.list", return_value=[{"vmname": "test", "vmx_path": "test"}]):
|
||||
@@ -60,14 +61,16 @@ async def test_list(loop, controller):
|
||||
await vm.list("hyperv")
|
||||
|
||||
|
||||
async def test_json(loop, controller):
|
||||
@pytest.mark.asyncio
|
||||
async def test_json(controller):
|
||||
|
||||
vm = GNS3VM(controller)
|
||||
assert vm.__json__() == vm._settings
|
||||
|
||||
|
||||
@pytest.mark.skipif(sys.platform.startswith("win"), reason="Not working well on Windows")
|
||||
async def test_update_settings(loop, controller):
|
||||
@pytest.mark.asyncio
|
||||
async def test_update_settings(controller):
|
||||
|
||||
vm = GNS3VM(controller)
|
||||
vm.settings = {
|
||||
@@ -85,6 +88,7 @@ async def test_update_settings(loop, controller):
|
||||
|
||||
|
||||
@pytest.mark.skipif(sys.platform.startswith("win"), reason="Not working well on Windows")
|
||||
@pytest.mark.asyncio
|
||||
async def test_auto_start(controller, dummy_gns3vm, dummy_engine):
|
||||
"""
|
||||
When start the compute should be add to the controller
|
||||
@@ -102,6 +106,7 @@ async def test_auto_start(controller, dummy_gns3vm, dummy_engine):
|
||||
|
||||
|
||||
@pytest.mark.skipif(sys.platform.startswith("win"), reason="Not working well on Windows")
|
||||
@pytest.mark.asyncio
|
||||
async def test_auto_start_with_error(controller, dummy_gns3vm, dummy_engine):
|
||||
|
||||
dummy_engine.start.side_effect = GNS3VMError("Dummy error")
|
||||
|
||||
Reference in new issue
Block a user