Exemplo n.º 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)
Exemplo n.º 2
0
def test_down_when_raise_error():
    c = DummyConnectionControl(raise_error=Exception)
    with pytest.raises(Exception):
        c.down('ethernet')
Exemplo n.º 3
0
def test_down():
    c = DummyConnectionControl()
    name = 'MyHome'
    c.down(name)
    assert c.down_args[0] == name