Fix sphinx autodocs using MagicMock