示例#1
0
def test_set_hostname_when_raise_error():
    c = DummyGeneralControl(raise_error=Exception)
    with pytest.raises(Exception):
        c.set_hostname('')
示例#2
0
def test_set_hostname():
    hostname = 'test'
    c = DummyGeneralControl()
    c.set_hostname(hostname)
    assert c.set_hostname_args == [hostname]