def test_get_mode_error(fake_target): rigctl = RigCtl(fake_target) rigctl._request = MagicMock() rigctl._request.return_value = 22 with pytest.raises(ValueError): rigctl.get_mode()
def test_get_mode(fake_target): rigctl = RigCtl(fake_target) rigctl._request = MagicMock() rigctl._request.return_value = "m" assert(rigctl.get_mode() == "m")