def test_show(): result_show = { 'key': 'value' } c = DummyConnectionControl(result_show=result_show) name = 'MyHome' assert c.show(name) == result_show
def test_show_when_no_arguments_are_passed(): c = DummyConnectionControl() with pytest.raises(ValueError): c.show('MyHome')
def test_show_when_raise_error(): c = DummyConnectionControl(raise_error=Exception) with pytest.raises(Exception): c.show('MyHome')