Fix link filters/suspend tests.

This commit is contained in:
grossmj committed 2018-03-19 18:25:56 +07:00
1 parent 8b91894fa4
commit 279b4d7b20
5 files changed
+43 -14

No files matched your search

+1 -1
View File
@@ -26,7 +26,7 @@ from tests.utils import asyncio_patch
@pytest.fixture
def nio():
return NIOUDP(4242, "127.0.0.1", 4343, {})
return NIOUDP(4242, "127.0.0.1", 4343)
@pytest.fixture
@@ -24,9 +24,9 @@ def test_mac_command(async_run):
node = AsyncioMagicMock()
node.name = "Test"
node.nios = {}
node.nios[0] = NIOUDP(55, "127.0.0.1", 56, {})
node.nios[0] = NIOUDP(55, "127.0.0.1", 56)
node.nios[0].name = "Ethernet0"
node.nios[1] = NIOUDP(55, "127.0.0.1", 56, {})
node.nios[1] = NIOUDP(55, "127.0.0.1", 56)
node.nios[1].name = "Ethernet1"
node._hypervisor.send = AsyncioMagicMock(return_value=["0050.7966.6801 1 Ethernet0", "0050.7966.6802 1 Ethernet1"])
console = EthernetSwitchConsole(node)
+3 -2
View File
@@ -130,8 +130,9 @@ def test_update_ubridge_udp_connection(node, async_run):
"latency": [10]
}
snio = NIOUDP(1245, "localhost", 1246, {})
dnio = NIOUDP(1245, "localhost", 1244, filters)
snio = NIOUDP(1245, "localhost", 1246)
dnio = NIOUDP(1245, "localhost", 1244)
dnio.filters = filters
with asyncio_patch("gns3server.compute.base_node.BaseNode._ubridge_apply_filters") as mock:
async_run(node.update_ubridge_udp_connection('VPCS-10', snio, dnio))
mock.assert_called_with("VPCS-10", filters)