c92b4ac0ff
assert_has_calls is not enough to check if a call didn't raise a warning. We also need to check the number of calls. This is done by creating a subclass of MagicMock implementing the assert_has_exact_calls method.