The Python Oracle

Asserting successive calls to a mock method

Become part of the top 3% of the developers by applying to Toptal https://topt.al/25cXVn

--

Music by Eric Matyas
https://www.soundimage.org
Track title: Lost Meadow

--

Chapters
00:00 Question
00:34 Accepted answer (Score 65)
00:56 Answer 2 (Score 272)
02:01 Answer 3 (Score 164)
03:36 Answer 4 (Score 22)
06:30 Thank you

--

Full question
https://stackoverflow.com/questions/7242...

Question links:
[helpful ]: https://docs.python.org/3/library/unitte...

Accepted answer links:
[Mock.call_args_list]: https://docs.python.org/3/library/unitte...
[Mock.call_count]: https://docs.python.org/3/library/unitte...

Answer 2 links:
https://docs.python.org/3/library/unitte...

Answer 3 links:
[assert_any_call]: https://docs.python.org/3/library/unitte...
[call_count]: https://docs.python.org/3/library/unitte...
[assert_has_calls]: https://docs.python.org/3/library/unitte...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#python #mocking

#avk47