示例#1
0
def test_modify():
    c = DummyConnectionControl()
    options = {
        'key': 'value'
    }
    name = 'MyHome'
    c.modify(name, options)
    assert c.modify_args[0] == (name, options)
示例#2
0
def test_modify_when_raise_error():
    c = DummyConnectionControl(raise_error=Exception)
    with pytest.raises(Exception):
        c.modify('ethernet', {'key':'value'})