Saturday 9 January 2021

pytest mocker assert has_calls

 Managed to figure it out with the help of another answer provided by the author of pytest-mock.

The assert should be called as follows if using alt. A: mock_a.assert_has_calls([mocker.call(mocker.ANY, 100), mocker.call(mocker.ANY, 50)])

Posting this to help others.


from : https://stackoverflow.com/questions/59839192/python-pytest-mock-assert-has-calls

No comments:

Post a Comment