mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-06 15:21:13 +02:00
3 files changed
+10
-13
No files matched your search
@@ -31,8 +31,8 @@ def test_json(on_gns3vm, project):
|
||||
"status": "started",
|
||||
"ports": [
|
||||
{
|
||||
"interface": "eth1",
|
||||
"name": "nat0",
|
||||
"interface": "virbr0",
|
||||
"name": "virbr0",
|
||||
"port_number": 0,
|
||||
"type": "ethernet"
|
||||
}
|
||||
|
||||
+2
-2
@@ -315,10 +315,10 @@ def async_run(loop):
|
||||
|
||||
|
||||
@pytest.yield_fixture
|
||||
def on_gns3vm():
|
||||
def on_gns3vm(linux_platform):
|
||||
"""
|
||||
Mock the hostname to emulate the GNS3 VM
|
||||
"""
|
||||
with patch("gns3server.utils.interfaces.interfaces", return_value=[{"name": "eth0"}, {"name": "eth1"}]):
|
||||
with patch("gns3server.utils.interfaces.interfaces", return_value=[{"name": "eth0"}, {"name": "eth1", "name": "virbr0"}]):
|
||||
with patch("socket.gethostname", return_value="gns3vm"):
|
||||
yield
|
||||
Reference in new issue
Block a user