コード例 #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