示例#1
0
def test_show():
    result_show = {
        'key': 'value'
    }
    c = DummyConnectionControl(result_show=result_show)
    name = 'MyHome'
    assert c.show(name) == result_show
示例#2
0
def test_show_when_no_arguments_are_passed():
    c = DummyConnectionControl()
    with pytest.raises(ValueError):
        c.show('MyHome')
示例#3
0
def test_show_when_raise_error():
    c = DummyConnectionControl(raise_error=Exception)
    with pytest.raises(Exception):
        c.show('MyHome')