1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-12-01 04:38:12 +00:00
gns3-server/tests/dynamips/test_bridge.py
grossmj 5560e81f9a Change rename command to a name property setter for all Dynamips
devices. Adjust the tests and upload the new dynamips that supports the
rename command for VMs.
2014-02-05 15:45:33 -07:00

32 lines
592 B
Python

from gns3server.modules.dynamips import Bridge
from gns3server.modules.dynamips import NIO_Null
import pytest
@pytest.fixture
def bridge(request, hypervisor):
bridge = Bridge(hypervisor, "bridge")
request.addfinalizer(bridge.delete)
return bridge
def test_bridge_exists(bridge):
assert bridge.list()
def test_rename_bridge(bridge):
bridge.name = "new bridge"
assert bridge.name == "new bridge"
def test_add_remove_nio(bridge):
nio = NIO_Null(bridge.hypervisor)
bridge.add_nio(nio)
assert bridge.nios
bridge.remove_nio(nio)
nio.delete()