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