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