def test_rotateClockwise(self, mock_output):
    mm = MoterManager(self.in1Pin, self.in1Pin)
mock_output.reset_mock
mm.stop()
mock_output.assert_has_calls([call(self.in1Pin, True), call(self.in2Pin,
    False)], any_order=True)

def test_rotateCounterClockwise(self, mock_output):
    mm = MoterManager(self.in1Pin, self.in1Pin)
mock_output.reset_mock
mm.stop()
mock_output.assert_has_calls([call(self.in1Pin, False), call(self.in2Pin,
    True)], any_order=True)
How to unittest GPIO output value of raspberry pi in Python