Python functools.partial
instances bind the function before monkeypatch can get at the function.
This makes patching them out difficult and tedious.
This fixture finds all partials in a module and replaces them with MagicMocks then yields the MagicMock to assert against.
This might be useful if the partials were calls to an API or service where we just want to make sure a call was made.
In my actual case these were calls to publish to various AWS SNS topics. The partials populate the topic ARN from an imported environment variable.