Mock has a helpful assert_called_with() method. However, as far as I understand this only checks the last call to a method.
If I have code that calls the mocked method 3 times successively, each time with different parameters, how can I assert these 3 calls with their specific parameters?
Mock has a helpful assert_called_with() method . However, as far as I understand this
Share
You can use the
Mock.call_args_listattribute to compare parameters to previous method calls. That in conjunction withMock.call_countattribute should give you full control.