def test_checksum_fails(self): p = GPHDT() p.checksum = '03' p.nmea_sentence = '$GPHDT,227.66,T*03' result = p.check_chksum() self.assertFalse(result)
def test_checksum_passes(self): p = GPHDT() p.checksum = '02' p.nmea_sentence = '$GPHDT,227.66,T*02' result = p.check_chksum() self.assertTrue(result)
def test_parses_map(self): p = GPHDT() p.parse("$GPHDT,227.66,T*02") self.assertEqual("GPHDT", p.sen_type) self.assertEqual("227.66", p.heading) self.assertEqual("T", p.hdg_true) self.assertEqual("02", p.checksum)
def test_parses_map(self): p = GPHDT() p.parse("$GPHDT,227.66,T*02") self.assertEquals("GPHDT", p.sen_type) self.assertEquals("227.66", p.heading) self.assertEquals("T", p.hdg_true) self.assertEquals("02", p.checksum)