Exemple #1
0
def test_set_location_should_fail_for_non_numeric_longitude():
    lat = 4.212332
    lon = 'B2'
    elev = 0.0

    with pytest.raises(ValueError):
        LPGAN_API_Tx.set_location(lat, lon, elev)
Exemple #2
0
def test_set_location_should_fail_for_non_numeric_elevation():
    lon = 62.33232
    lat = 4.212332
    elev = 'C1'

    with pytest.raises(ValueError):
        LPGAN_API_Tx.set_location(lat, lon, elev)
Exemple #3
0
def test_set_location_should_create_valid_string():
    lat = 52.333233
    lon = 4.212332
    elev = 0.0

    expected_string = f'set_location(\"{lat}\",\"{lon}\",\"{elev}\")\r\n'

    assert expected_string == LPGAN_API_Tx.set_location(lat, lon, elev)