Test unknown dstcall

pull/47/head
Konstantin Gründger 2017-12-13 22:06:45 +01:00
rodzic a580481590
commit b309cfe805
1 zmienionych plików z 5 dodań i 1 usunięć

Wyświetl plik

@ -6,7 +6,7 @@ from datetime import datetime
from time import sleep
from ogn.parser.parse import parse
from ogn.parser.exceptions import AprsParseError
from ogn.parser.exceptions import AprsParseError, OgnParseError
class TestStringMethods(unittest.TestCase):
@ -63,6 +63,10 @@ class TestStringMethods(unittest.TestCase):
with self.assertRaises(AprsParseError):
parse("Lachens>APRS,TCPIwontbeavalidstring")
def test_fail_bad_dstcall(self):
with self.assertRaises(OgnParseError):
parse("EPZR>WTFDSTCALL,TCPIP*,qAC,GLIDERN1:>093456h this is a comment")
def test_v026_chile(self):
# receiver beacons from chile have a APRS position message with a pure user comment
message = parse("VITACURA1>APRS,TCPIP*,qAC,GLIDERN4:/201146h3322.79SI07034.80W&/A=002329 Vitacura Municipal Aerodrome, Club de Planeadores Vitacura", reference_date=datetime(2015, 1, 1))