Esempio n. 1
0
    def test_relevant_keys_only(self):
        # return only keys where we got informations
        message = OgnParser().parse_aircraft_beacon("id093D0930")

        self.assertIsNotNone(message)
        self.assertEqual(
            sorted(message.keys()),
            sorted([
                'address_type', 'aircraft_type', 'stealth', 'address',
                'no-tracking'
            ]))
Esempio n. 2
0
    def test_relevant_keys_only(self):
        # return only keys where we got informations
        message = OgnParser().parse_receiver_beacon(
            "v0.2.5.ARM CPU:0.4 RAM:638.0/970.5MB NTP:0.2ms/-1.1ppm")

        self.assertIsNotNone(message)
        self.assertEqual(
            sorted(message.keys()),
            sorted([
                'version', 'platform', 'cpu_load', 'free_ram', 'total_ram',
                'ntp_error', 'rt_crystal_correction'
            ]))