コード例 #1
0
def test_get_xit(fake_target):
    rigctl = RigCtl(fake_target)
    rigctl._request = MagicMock()
    rigctl._request.return_value = "22"
    assert(rigctl.get_xit() == "22")
コード例 #2
0
def test_get_xit_error(fake_target):
    rigctl = RigCtl(fake_target)
    rigctl._request = MagicMock()
    rigctl._request.return_value = 22
    with pytest.raises(ValueError):
        rigctl.get_xit()