示例#1
0
def test_up():
    c = DummyConnectionControl()
    name = 'MyHome'
    c.up(name)
    assert c.up_args[0] == (name, None)

    c.up(name, wait=10)
    assert c.up_args[1] == (name, 10)
示例#2
0
def test_up_when_raise_error():
    c = DummyConnectionControl(raise_error=Exception)
    with pytest.raises(Exception):
        c.up('ethernet')
示例#3
0
def test_up():
    c = DummyConnectionControl()
    name = 'MyHome'
    c.up(name)
    assert c.up_args[0] == name