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