def test_gets_properties(self):
        p = GPBOD()
        p.parse("$GPBOD,045.,T,023.,M,DEST,START")

        self.assertEqual(p.bearing_true, '045.,T')
        self.assertEqual(p.bearing_magnetic, '023.,M')
        self.assertEqual(p.destination, 'DEST')
        self.assertEqual(p.origin, 'START')
Exemple #2
0
    def test_gets_properties(self):
        p = GPBOD()
        p.parse("$GPBOD,045.,T,023.,M,DEST,START")

        self.assertEquals(p.bearing_true, '045.,T')
        self.assertEquals(p.bearing_magnetic, '023.,M')
        self.assertEquals(p.destination, 'DEST')
        self.assertEquals(p.origin, 'START')
    def test_parses_map(self):
        p = GPBOD()
        p.parse("$GPBOD,045.,T,023.,M,DEST,START")

        self.assertEqual("GPBOD", p.sen_type)
        self.assertEqual(p.parts,
                          ['GPBOD', '045.', 'T', '023.', 'M', 'DEST', 'START'])
        self.assertEqual(p.bearing_t, '045.')
        self.assertEqual(p.bearing_t_type, 'T')
        self.assertEqual(p.bearing_mag, '023.')
        self.assertEqual(p.bearing_mag_type, 'M')
        self.assertEqual(p.dest, 'DEST')
        self.assertEqual(p.start, 'START')
Exemple #4
0
    def test_parses_map(self):
        p = GPBOD()
        p.parse("$GPBOD,045.,T,023.,M,DEST,START")

        self.assertEquals("GPBOD", p.sen_type)
        self.assertEquals(p.parts,
                          ['GPBOD', '045.', 'T', '023.', 'M', 'DEST', 'START'])
        self.assertEquals(p.bearing_t, '045.')
        self.assertEquals(p.bearing_t_type, 'T')
        self.assertEquals(p.bearing_mag, '023.')
        self.assertEquals(p.bearing_mag_type, 'M')
        self.assertEquals(p.dest, 'DEST')
        self.assertEquals(p.start, 'START')