示例#1
0
 def test_registered(self, mocker):
     mocker.spy(parser.APRS, '_parse_protocol_specific')
     parser.Parser("FLRDDA5BA>APRS,qAS,LFMX:/165829h4415.41N/00600.03E'342/"
                   "049/A=005524 id0ADDA5BA -454fpm -1.1rot 8.8dB 0e "
                   "+51.2kHz gps4x5")
     parser.APRS._parse_protocol_specific.assert_called_once_with(
         'id0ADDA5BA -454fpm -1.1rot 8.8dB 0e +51.2kHz gps4x5')
示例#2
0
 def test_registered(self, mocker):
     mocker.spy(parser.Fanet, '_parse_protocol_specific')
     parser.Parser('FNT1103CE>OGNFNT,qAS,FNB1103CE:/183734h5057.94N/'
                   '00801.00Eg354/001/A=001042 !W30! id1E1103CE -10fpm')
     parser.Fanet._parse_protocol_specific.assert_called_once_with(
         '!W30! id1E1103CE -10fpm')
示例#3
0
 def test_registered(self, mocker):
     mocker.spy(parser.Capturs, '_preprocess_message')
     msg = (
         "FLRDDEEF1>OGCAPT,qAS,CAPTURS:/065144h4837.56N/00233.80E'000/000/")
     parser.Parser(msg)
     parser.Capturs._preprocess_message.assert_called_once_with(msg)
示例#4
0
 def test_registered(self, mocker):
     mocker.spy(parser.LiveTrack24, '_parse_protocol_specific')
     parser.Parser("FLRDDE48A>OGLT24,qAS,LT24:/102606h4030.47N/00338.38W'"
                   "000/018/A=002267 id25387 +000fpm GPS")
     parser.LiveTrack24._parse_protocol_specific.assert_called_once_with(
         'id25387 +000fpm GPS')
示例#5
0
 def test_registered(self, mocker):
     mocker.spy(parser.Skylines, '_parse_protocol_specific')
     parser.Parser("FLRDDDD78>OGSKYL,qAS,SKYLINES:/134403h4225.90N/00144.8"
                   "3E'000/000/A=008438 id2816 +000fpm")
     parser.Skylines._parse_protocol_specific.assert_called_once_with(
         'id2816 +000fpm')
示例#6
0
 def test_registered(self, mocker):
     mocker.spy(parser.Spider, '_parse_protocol_specific')
     parser.Parser("FLRDDF944>OGSPID,qAS,SPIDER:/190930h3322.78S/07034.60W'"
                   "000/000/A=002263 id300234010617040 +19dB LWE 3D")
     parser.Spider._parse_protocol_specific.assert_called_once_with(
         'id300234010617040 +19dB LWE 3D')
示例#7
0
 def test_registered(self, mocker):
     mocker.spy(parser.Spot, '_parse_protocol_specific')
     parser.Parser("ICA3E7540>OGSPOT,qAS,SPOT:/161427h1448.35S/04610.86W'"
                   "000/000/A=008677 id0-2860357 SPOT3 GOOD")
     parser.Spot._parse_protocol_specific.assert_called_once_with(
         'id0-2860357 SPOT3 GOOD')
示例#8
0
 def test_registered(self, mocker):
     mocker.spy(parser.Naviter, '_parse_protocol_specific')
     parser.Parser("NAV04220E>OGNAVI,qAS,NAVITER:/140748h4552.27N/01155.61E"
                   "'090/012/A=006562 !W81! id044004220E +060fpm +1.2rot")
     parser.Naviter._parse_protocol_specific.assert_called_once_with(
         '!W81! id044004220E +060fpm +1.2rot')
示例#9
0
 def test_call(self, mocker):
     msg = 'FLR123456>APRS,reminder_of_message'
     with mocker.patch('ogn_lib.parser.APRS.parse_message'):
         parser.Parser(msg)
         parser.APRS.parse_message.assert_called_once_with(msg)