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