Example #1
0
def test_set_frequency(hostname, port, fake_target):
    DEFAULT_CONFIG["hostname"] = "127.0.0.1"
    DEFAULT_CONFIG["port"] = "80"
    rigctl = RigCtl(fake_target)
    rigctl._request = MagicMock()
    rigctl.set_frequency("1000000")
    rigctl._request.assert_called_once_with('F 1000000', None)
Example #2
0
def test_set_frequency():
    rigctl = RigCtl()
    with pytest.raises(ValueError):
        rigctl.set_frequency("test")
Example #3
0
def test_set_connection_refused(hostname, port):
    DEFAULT_CONFIG["hostname"] = hostname
    DEFAULT_CONFIG["port"] = port
    rigctl = RigCtl()
    with pytest.raises(socket.error):
        rigctl.set_frequency("1000000")
Example #4
0
def test_set_bad_frequency(fake_target):
    rigctl = RigCtl(fake_target)
    with pytest.raises(ValueError):
        rigctl.set_frequency("test")