def test_checksum_fails(self): p = GPWCV() p.checksum = '1B' p.nmea_sentence = '$GPWCV,2.3,N,ABCD*1B' result = p.check_chksum() self.assertFalse(result)
def test_checksum_passes(self): p = GPWCV() p.checksum = '1C' p.nmea_sentence = '$GPWCV,2.3,N,ABCD*1C' result = p.check_chksum() self.assertTrue(result)
def test_parses_map(self): p = GPWCV() p.parse("$GPWCV,2.3,N,ABCD*1C") self.assertEqual("GPWCV", p.sen_type) self.assertEqual("2.3", p.velocity) self.assertEqual("N", p.vel_units) self.assertEqual("ABCD", p.waypoint_id)
def test_parses_map(self): p = GPWCV() p.parse("$GPWCV,2.3,N,ABCD*1C") self.assertEquals("GPWCV", p.sen_type) self.assertEquals("2.3", p.velocity) self.assertEquals("N", p.vel_units) self.assertEquals("ABCD", p.waypoint_id)