mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-04 06:21:15 +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
Whitespace-only changes.
@@ -27,6 +27,7 @@ def gns3vm(controller):
|
||||
return RemoteGNS3VM(controller)
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_list(gns3vm, controller):
|
||||
|
||||
await controller.add_compute("r1", name="R1", host="r1.local", connect=False)
|
||||
@@ -34,6 +35,7 @@ async def test_list(gns3vm, controller):
|
||||
assert res == [{"vmname": "R1"}]
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_start(gns3vm, controller):
|
||||
|
||||
await controller.add_compute("r1",
|
||||
@@ -55,7 +57,8 @@ async def test_start(gns3vm, controller):
|
||||
assert gns3vm.password == "world"
|
||||
|
||||
|
||||
async def test_start_invalid_vm(loop, gns3vm, controller):
|
||||
@pytest.mark.asyncio
|
||||
async def test_start_invalid_vm(gns3vm, controller):
|
||||
|
||||
await controller.add_compute("r1",
|
||||
name="R1",
|
||||
|
||||
@@ -16,23 +16,23 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import pytest
|
||||
import asyncio
|
||||
|
||||
from tests.utils import asyncio_patch, AsyncioMagicMock
|
||||
from tests.utils import asyncio_patch
|
||||
from gns3server.utils.asyncio import wait_run_in_executor
|
||||
from unittest.mock import patch
|
||||
|
||||
from gns3server.controller.gns3vm.virtualbox_gns3_vm import VirtualBoxGNS3VM
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
async def gns3vm(loop, controller):
|
||||
@pytest.mark.asyncio
|
||||
async def gns3vm(controller):
|
||||
|
||||
vm = VirtualBoxGNS3VM(controller)
|
||||
vm.vmname = "GNS3 VM"
|
||||
return vm
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_look_for_interface(gns3vm):
|
||||
|
||||
showvminfo = """
|
||||
@@ -68,6 +68,7 @@ GuestMemoryBalloon=0
|
||||
# assert res == -1
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_cpu_vendor_id(gns3vm):
|
||||
|
||||
from cpuinfo import get_cpu_info
|
||||
|
||||
@@ -21,7 +21,8 @@ from gns3server.controller.gns3vm.vmware_gns3_vm import VMwareGNS3VM
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
async def gns3vm(loop, controller):
|
||||
@pytest.mark.asyncio
|
||||
async def gns3vm(controller):
|
||||
|
||||
vm = VMwareGNS3VM(controller)
|
||||
vm.vmname = "GNS3 VM"
|
||||
@@ -34,6 +35,7 @@ def vmx_path(tmpdir):
|
||||
return str(tmpdir / "vmwware_vm.vmx")
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_set_extra_options(gns3vm, vmx_path, windows_platform):
|
||||
|
||||
gns3vm._vmx_path = vmx_path
|
||||
|
||||
Reference in new issue
Block a user