def test_new_message(self): decoder = NecDecoder() start = decoder._find_start_index(TestNecDecoder.reference_pulses) decoder._classify_message(TestNecDecoder.reference_pulses, start) assert decoder.current_message_type == NEW_MESSAGE
def test_valid_pulses(self): decoder = NecDecoder() start = decoder._find_start_index(TestNecDecoder.reference_pulses) decoder._classify_message(TestNecDecoder.reference_pulses, start) assert decoder._validate_pulses(TestNecDecoder.reference_pulses, start)