Ejemplo n.º 1
0
def test_connect():
    c = DummyDeviceControl()
    ifname = 'eth0'
    c.connect(ifname)
    assert c.connect_args[0] == (ifname, None)
Ejemplo n.º 2
0
def test_connect_when_raise_error():
    c = DummyDeviceControl(raise_error=Exception)
    with pytest.raises(Exception):
        c.connect('eth0')
Ejemplo n.º 3
0
def test_connect():
    c = DummyDeviceControl()
    ifname = 'eth0'
    c.connect(ifname)
    assert c.connect_args == [ifname]