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.
Most of the code is mocking boilerplate but it shows that the behaviour is as defined in the comments.