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