mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-28 16:34:34 +02:00
refactor(gns3server,tests): StrEnum, ASYNC109 and others
This commit is contained in:
54 files changed
+195
-165
No files matched your search
@@ -64,7 +64,7 @@ async def vm(compute_project, manager):
|
||||
def _capable(vm, monkeypatch):
|
||||
"""Make both anchor-lifecycle probes answer True."""
|
||||
|
||||
async def probe(timeout=15.0):
|
||||
async def probe(timeout=15.0): # noqa: ASYNC109 - mock signature must match patched API
|
||||
return True
|
||||
|
||||
monkeypatch.setattr("gns3server.compute.docker.iol_docker_vm.probe_bridge_tap_support", probe)
|
||||
@@ -110,7 +110,7 @@ async def test_prepare_tap_datapath_falls_back_without_either_probe(vm, monkeypa
|
||||
cannot carry kernel links.
|
||||
"""
|
||||
|
||||
async def probe(timeout=15.0):
|
||||
async def probe(timeout=15.0): # noqa: ASYNC109 - mock signature must match patched API
|
||||
return None
|
||||
|
||||
monkeypatch.setattr("gns3server.compute.docker.iol_docker_vm.probe_bridge_tap_support", probe)
|
||||
|
||||
@@ -452,7 +452,7 @@ async def test_add_ubridge_connection_timeout_is_actionable(compute_project, man
|
||||
_mock_wiring(vm)
|
||||
vm._stop_ubridge = AsyncioMagicMock()
|
||||
|
||||
async def raise_timeout(path, timeout=60):
|
||||
async def raise_timeout(path, timeout=60): # noqa: ASYNC109 - mock signature must match patched API
|
||||
raise TimeoutError()
|
||||
|
||||
with patch("gns3server.compute.docker.vendor_docker_vm.wait_for_file_creation", side_effect=raise_timeout):
|
||||
|
||||
Reference in new issue
Block a user