Esempio n. 1
0
    def test_extract_header(self):
        '''
        Test if we can extract the firmware, serial number and instrument label
        from the header.
        '''
        def event_callback(event):
            pass

        protocol = SatlanticPARInstrumentProtocol(event_callback)
        protocol._extract_header(VALID_HEADER)

        self.assertEqual(protocol._firmware, VALID_FIRMWARE)
        self.assertEqual(protocol._serial, VALID_SERIAL)
        self.assertEqual(protocol._instrument, VALID_INSTRUMENT)
Esempio n. 2
0
    def test_extract_header(self):
        '''
        Test if we can extract the firmware, serial number and instrument label
        from the header.
        '''
        def event_callback(event):
            pass

        protocol = SatlanticPARInstrumentProtocol(event_callback)
        protocol._extract_header(VALID_HEADER)

        self.assertEqual(protocol._firmware, VALID_FIRMWARE)
        self.assertEqual(protocol._serial, VALID_SERIAL)
        self.assertEqual(protocol._instrument, VALID_INSTRUMENT)