Beispiel #1
0
def test_down():
    c = DummyConnectionControl()
    name = 'MyHome'
    c.down(name)
    assert c.down_args[0] == (name, None)

    c.down(name, wait=10)
    assert c.down_args[1] == (name, 10)
Beispiel #2
0
def test_down_when_raise_error():
    c = DummyConnectionControl(raise_error=Exception)
    with pytest.raises(Exception):
        c.down('ethernet')
Beispiel #3
0
def test_down():
    c = DummyConnectionControl()
    name = 'MyHome'
    c.down(name)
    assert c.down_args[0] == name