`unittest.mock` has the most astonishing API.
side_effect can be an Exception class, Exception object, a callable, or a iterable. But of course! They all look like ducks to me.
You see, your API can be an Hieronymus Bosch nightmare as long as you document it and blame the user.