Fixes NAT node not working on Windows (#1163)

This commit is contained in:
ziajka committed 2017-08-21 10:17:56 +02:00
1 parent 3dd5dbe0c1
commit 7523e9c4bc
2 files changed
+23 -1

No files matched your search

+20
View File
@@ -59,3 +59,23 @@ def test_json_darwin(darwin_platform, project):
}
]
}
def test_json_windows_with_full_name_of_interface(windows_platform, project):
with patch("gns3server.utils.interfaces.interfaces", return_value=[
{"name": "VMware Network Adapter VMnet8", "special": True, "type": "ethernet"}]):
nat = Nat("nat1", str(uuid.uuid4()), project, MagicMock())
assert nat.__json__() == {
"name": "nat1",
"node_id": nat.id,
"project_id": project.id,
"status": "started",
"ports_mapping": [
{
"interface": "vmnet8",
"name": "nat0",
"port_number": 0,
"type": "ethernet"
}
]
}