Use TOX_CONSTRAINTS_FILE

UPPER_CONSTRAINTS_FILE is old name and deprecated.
This allows to use upper-constraints file as more
readable way instead of UPPER_CONSTRAINTS_FILE=<lower-constraints file>.
For more info. please refer [1]. It also import ugettext_lazy
in zaqar_ui/api/rest/zaqar.py file to fix pep8 issue.

[1] https://zuul-ci.org/docs/zuul-jobs/python-roles.html#rolevar-tox.tox_constraints_file

Change-Id: I4e0c00b6d01470f59a6fa5799eaa10d3e5e94f61
This commit is contained in:
manchandavishal 2021-02-16 05:45:14 +00:00
parent bbf27033bf
commit b419a23ce1
2 changed files with 3 additions and 2 deletions

View File

@ -14,7 +14,7 @@ setenv = VIRTUAL_ENV={envdir}
NOSE_OPENSTACK_SHOW_ELAPSED=1
DJANGO_SETTINGS_MODULE=zaqar_ui.test.settings
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
-c{env:TOX_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands =
@ -79,7 +79,7 @@ commands =
[testenv:docs]
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
-c{env:TOX_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
# zaqar-ui doc generated the module reference,
# so requirements.txt should be here to apply upper-constraints
-r{toxinidir}/requirements.txt

View File

@ -15,6 +15,7 @@
import json
import yaml
from django.utils.translation import ugettext_lazy as _
from django.views import generic
from openstack_dashboard.api.rest import urls
from openstack_dashboard.api.rest import utils as rest_utils