kopia lustrzana https://github.com/glidernet/python-ogn-client
Tests for OGFLR, OGNTRK and OGNSDR
rodzic
4f1f6c09ae
commit
6044e58773
|
@ -140,7 +140,7 @@ def parse_ogn_beacon(aprs_comment, dstcall="APRS"):
|
|||
return rc_data
|
||||
|
||||
raise OgnParseError(aprs_comment)
|
||||
elif dstcall == "OGNFLR":
|
||||
elif dstcall == "OGFLR":
|
||||
ac_data = parse_ogn_aircraft_beacon(aprs_comment)
|
||||
ac_data.update({'beacon_type': 'aircraft_beacon'})
|
||||
return ac_data
|
||||
|
@ -148,6 +148,10 @@ def parse_ogn_beacon(aprs_comment, dstcall="APRS"):
|
|||
ac_data = parse_ogn_aircraft_beacon(aprs_comment)
|
||||
ac_data.update({'beacon_type': 'aircraft_beacon'})
|
||||
return ac_data
|
||||
elif dstcall == "OGNSDR":
|
||||
ac_data = parse_ogn_receiver_beacon(aprs_comment)
|
||||
ac_data.update({'beacon_type': 'receiver_beacon'})
|
||||
return ac_data
|
||||
elif dstcall == "OGLT24":
|
||||
ac_data = parse_lt24_beacon(aprs_comment)
|
||||
ac_data.update({'beacon_type': 'lt24_beacon'})
|
||||
|
|
|
@ -26,6 +26,15 @@ class TestStringMethods(unittest.TestCase):
|
|||
def test_aprs_receiver_beacons(self):
|
||||
self.parse_valid_beacon_data_file(filename='aprs_receiver.txt', beacon_type='receiver_beacon')
|
||||
|
||||
def test_ogn_flarm_beacons(self):
|
||||
self.parse_valid_beacon_data_file(filename='ogn_flarm.txt', beacon_type='aircraft_beacon')
|
||||
|
||||
def test_ogn_receiver_beacons(self):
|
||||
self.parse_valid_beacon_data_file(filename='ogn_receiver.txt', beacon_type='receiver_beacon')
|
||||
|
||||
def test_ogn_tracker_beacons(self):
|
||||
self.parse_valid_beacon_data_file(filename='ogn_tracker.txt', beacon_type='aircraft_beacon')
|
||||
|
||||
def test_lt24_beacons(self):
|
||||
self.parse_valid_beacon_data_file(filename='lt24.txt', beacon_type='lt24_beacon')
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue