Improved mocking mechanism in Sphinx configuration.