def test_signal(self, mock_output): exp_inhibit = 21 exp_pins = [4, 5, 6, 8] d = Demux(exp_inhibit, exp_pins) mock_output.reset_mock() d.signal(3) mock_output.assert_has_calls( [call(exp_pins[0], GPIO.HIGH), call(exp_pins[1], GPIO.HIGH)], any_order=True) mock_output.reset_mock() d.signal(8) mock_output.assert_has_calls([call(exp_pins[3], GPIO.HIGH)], any_order=True)