diff --git a/doc/source/conf.py b/doc/source/conf.py index d3b84fd21f..7487c6ac71 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -45,7 +45,8 @@ ROOT = os.path.abspath(os.path.join(BASE_DIR, "..", "..")) sys.path.insert(0, ROOT) # This is required for ReadTheDocs.org, but isn't a bad idea anyway. -os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'openstack_dashboard.settings') +os.environ.setdefault('DJANGO_SETTINGS_MODULE', + 'openstack_dashboard.test.settings') django.setup() diff --git a/tox.ini b/tox.ini index 7def53269d..9ca96c3ff0 100644 --- a/tox.ini +++ b/tox.ini @@ -56,6 +56,9 @@ basepython = python3 deps = {[testenv]deps} -r{toxinidir}/doc/requirements.txt +setenv = + {[testenv]setenv} + DJANGO_SETTINGS_MODULE=openstack_dashboard.test.settings commands = flake8 {posargs} {envpython} {toxinidir}/manage.py extract_messages --verbosity 0 --check-only