From cb28412dfd91d7ca320b88ba3460e06e64fcfffb Mon Sep 17 00:00:00 2001 From: Eric Holscher Date: Tue, 7 Jul 2015 16:32:38 -0700 Subject: [PATCH] Fix test mocks --- autoapi/extension.py | 4 ++-- tests/test_domains.py | 2 +- tests/test_integration.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/autoapi/extension.py b/autoapi/extension.py index e468fdb..9795101 100644 --- a/autoapi/extension.py +++ b/autoapi/extension.py @@ -51,7 +51,7 @@ def run_autoapi(app): domain = mapping[app.config.autoapi_type] 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 else: 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_ignore', ['*migrations*'], '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_keep_files', False, 'html') app.add_config_value('autoapi_add_toctree_entry', True, 'html') diff --git a/tests/test_domains.py b/tests/test_domains.py index ac1b375..8a23050 100644 --- a/tests/test_domains.py +++ b/tests/test_domains.py @@ -71,7 +71,7 @@ class DomainTests(unittest.TestCase): '''Test basic get objects''' objs = [] - def _mock_find(self, pattern, **kwargs): + def _mock_find(self, patterns, **kwargs): return {'items': ['foo', 'bar']} def _mock_read(self, path): diff --git a/tests/test_integration.py b/tests/test_integration.py index 994189a..a128a40 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -73,7 +73,7 @@ class DotNetTests(LanguageIntegrationTests): return json.load(open('../fixtures/dotnet.json')) # 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') self.paths['inmem'] = data