Beispiel #1
0
def test_generate(latitude, longitude, timestamp, timestamp_type, messaging, expected_output):
    p = PositionPacket()

    p.source = "XX1XX"
    p.destination = "APRS"
    p.path = "TCPIP"

    p.symbol_table = "/"
    p.symbol_id = "k"

    p.latitude = latitude
    p.longitude = longitude

    p.timestamp = timestamp
    p.timestamp_type = timestamp_type

    p.messaging = messaging

    output = p.generate()

    assert output == expected_output
Beispiel #2
0
def test_invalid_messaging_type():
    p = PositionPacket()

    with pytest.raises(TypeError):
        p.messaging = None