mirror of
https://github.com/readthedocs/sphinx-autoapi
synced 2024-11-17 21:25:35 +00:00
Fix test mocks
This commit is contained in:
parent
6f6e09b1f6
commit
cb28412dfd
@ -51,7 +51,7 @@ def run_autoapi(app):
|
|||||||
domain = mapping[app.config.autoapi_type]
|
domain = mapping[app.config.autoapi_type]
|
||||||
domain_obj = domain(app, template_dir=app.config.autoapi_template_dir)
|
domain_obj = domain(app, template_dir=app.config.autoapi_template_dir)
|
||||||
|
|
||||||
if app.config.autoapi_file_pattern:
|
if app.config.autoapi_file_patterns:
|
||||||
file_patterns = app.config.autoapi_file_pattern
|
file_patterns = app.config.autoapi_file_pattern
|
||||||
else:
|
else:
|
||||||
file_patterns = default_file_mapping[app.config.autoapi_type]
|
file_patterns = default_file_mapping[app.config.autoapi_type]
|
||||||
@ -111,7 +111,7 @@ def setup(app):
|
|||||||
app.add_config_value('autoapi_root', 'autoapi', 'html')
|
app.add_config_value('autoapi_root', 'autoapi', 'html')
|
||||||
app.add_config_value('autoapi_ignore', ['*migrations*'], 'html')
|
app.add_config_value('autoapi_ignore', ['*migrations*'], 'html')
|
||||||
app.add_config_value('autoapi_options', default_options, 'html')
|
app.add_config_value('autoapi_options', default_options, 'html')
|
||||||
app.add_config_value('autoapi_file_pattern', None, 'html')
|
app.add_config_value('autoapi_file_patterns', None, 'html')
|
||||||
app.add_config_value('autoapi_dir', 'autoapi', 'html')
|
app.add_config_value('autoapi_dir', 'autoapi', 'html')
|
||||||
app.add_config_value('autoapi_keep_files', False, 'html')
|
app.add_config_value('autoapi_keep_files', False, 'html')
|
||||||
app.add_config_value('autoapi_add_toctree_entry', True, 'html')
|
app.add_config_value('autoapi_add_toctree_entry', True, 'html')
|
||||||
|
@ -71,7 +71,7 @@ class DomainTests(unittest.TestCase):
|
|||||||
'''Test basic get objects'''
|
'''Test basic get objects'''
|
||||||
objs = []
|
objs = []
|
||||||
|
|
||||||
def _mock_find(self, pattern, **kwargs):
|
def _mock_find(self, patterns, **kwargs):
|
||||||
return {'items': ['foo', 'bar']}
|
return {'items': ['foo', 'bar']}
|
||||||
|
|
||||||
def _mock_read(self, path):
|
def _mock_read(self, path):
|
||||||
|
@ -73,7 +73,7 @@ class DotNetTests(LanguageIntegrationTests):
|
|||||||
return json.load(open('../fixtures/dotnet.json'))
|
return json.load(open('../fixtures/dotnet.json'))
|
||||||
|
|
||||||
# Mock this because it's slow otherwise
|
# Mock this because it's slow otherwise
|
||||||
def _dotnet_load(self, pattern, dir, ignore=[]):
|
def _dotnet_load(self, patterns, dir, ignore=[]):
|
||||||
data = self.read_file(path='inmem')
|
data = self.read_file(path='inmem')
|
||||||
self.paths['inmem'] = data
|
self.paths['inmem'] = data
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user