Esempio n. 1
0
def test_disconnect():
    c = DummyDeviceControl()
    ifname = 'eth0'
    c.disconnect(ifname)
    assert c.disconnect_args[0] == (ifname, None)
Esempio n. 2
0
def test_disconnect_when_raise_error():
    c = DummyDeviceControl(raise_error=Exception)
    with pytest.raises(Exception):
        c.disconnect('eth0')
Esempio n. 3
0
def test_disconnect():
    c = DummyDeviceControl()
    ifname = 'eth0'
    c.disconnect(ifname)
    assert c.disconnect_args == [ifname]