def test_set_hostname_when_raise_error(): c = DummyGeneralControl(raise_error=Exception) with pytest.raises(Exception): c.set_hostname('')
def test_set_hostname(): hostname = 'test' c = DummyGeneralControl() c.set_hostname(hostname) assert c.set_hostname_args == [hostname]