From b309cfe805e5c2277371afb686509b2050a853b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20Gru=CC=88ndger?= Date: Wed, 13 Dec 2017 22:06:45 +0100 Subject: [PATCH] Test unknown dstcall --- tests/parser/test_parse.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/parser/test_parse.py b/tests/parser/test_parse.py index 0a8ddbc..1bff03c 100644 --- a/tests/parser/test_parse.py +++ b/tests/parser/test_parse.py @@ -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))