Allow to run pep8/docs tox env with horizon plugins
As of now, when horizon plugins are configured in the horizon repo, pep8 and docs tox env cannot run. This is because openstack_dashboard.settings tries to load horizon plugins but horizon plugins are not installed in tox env by default and the jobs will fail as a result. This commit changes to use openstack_dashboard.test.settings as DJANGO_SETTINGS_MODULE for these tox environments by default. Change-Id: I6a9d0c74271cc4addd8a0964b5955d7d3b6d8267
This commit is contained in:
parent
06ab7a5047
commit
25b6706f50
@ -45,7 +45,8 @@ ROOT = os.path.abspath(os.path.join(BASE_DIR, "..", ".."))
|
|||||||
sys.path.insert(0, ROOT)
|
sys.path.insert(0, ROOT)
|
||||||
|
|
||||||
# This is required for ReadTheDocs.org, but isn't a bad idea anyway.
|
# 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()
|
django.setup()
|
||||||
|
|
||||||
|
3
tox.ini
3
tox.ini
@ -56,6 +56,9 @@ basepython = python3
|
|||||||
deps =
|
deps =
|
||||||
{[testenv]deps}
|
{[testenv]deps}
|
||||||
-r{toxinidir}/doc/requirements.txt
|
-r{toxinidir}/doc/requirements.txt
|
||||||
|
setenv =
|
||||||
|
{[testenv]setenv}
|
||||||
|
DJANGO_SETTINGS_MODULE=openstack_dashboard.test.settings
|
||||||
commands =
|
commands =
|
||||||
flake8 {posargs}
|
flake8 {posargs}
|
||||||
{envpython} {toxinidir}/manage.py extract_messages --verbosity 0 --check-only
|
{envpython} {toxinidir}/manage.py extract_messages --verbosity 0 --check-only
|
||||||
|
Loading…
Reference in New Issue
Block a user