diff --git a/manila_ui/dashboards/admin/shares/templates/shares/_detail_share_instance.html b/manila_ui/dashboards/admin/shares/templates/shares/_detail_share_instance.html index 86a720d8..f441a0db 100644 --- a/manila_ui/dashboards/admin/shares/templates/shares/_detail_share_instance.html +++ b/manila_ui/dashboards/admin/shares/templates/shares/_detail_share_instance.html @@ -1,5 +1,4 @@ {% load i18n sizeformat parse_date %} -{% load url from future %}

{% trans "Share Instance Overview" %}

diff --git a/manila_ui/dashboards/admin/shares/templates/shares/_detail_share_server.html b/manila_ui/dashboards/admin/shares/templates/shares/_detail_share_server.html index 0ed75e07..60cefc40 100644 --- a/manila_ui/dashboards/admin/shares/templates/shares/_detail_share_server.html +++ b/manila_ui/dashboards/admin/shares/templates/shares/_detail_share_server.html @@ -1,5 +1,4 @@ {% load i18n sizeformat parse_date %} -{% load url from future %}

{% trans "Share Server Overview" %}

diff --git a/manila_ui/dashboards/admin/shares/templates/shares/_manage_share_type_access.html b/manila_ui/dashboards/admin/shares/templates/shares/_manage_share_type_access.html index b11b50be..41678dc3 100644 --- a/manila_ui/dashboards/admin/shares/templates/shares/_manage_share_type_access.html +++ b/manila_ui/dashboards/admin/shares/templates/shares/_manage_share_type_access.html @@ -1,6 +1,5 @@ {% extends "horizon/common/_modal_form.html" %} {% load i18n %} -{% load url from future %} {% block form_id %}{% endblock %} {% block form_action %}{% url 'horizon:admin:shares:manage_share_type_access' share_type.id %}{% endblock %} diff --git a/manila_ui/dashboards/admin/shares/templates/shares/_snapshot_detail_overview.html b/manila_ui/dashboards/admin/shares/templates/shares/_snapshot_detail_overview.html index 90760c2f..f01ac552 100644 --- a/manila_ui/dashboards/admin/shares/templates/shares/_snapshot_detail_overview.html +++ b/manila_ui/dashboards/admin/shares/templates/shares/_snapshot_detail_overview.html @@ -1,5 +1,4 @@ {% load i18n sizeformat parse_date %} -{% load url from future %}

{% trans "Snapshot Overview" %}

diff --git a/manila_ui/dashboards/admin/shares/urls.py b/manila_ui/dashboards/admin/shares/urls.py index 509c9313..7e813ad7 100644 --- a/manila_ui/dashboards/admin/shares/urls.py +++ b/manila_ui/dashboards/admin/shares/urls.py @@ -10,13 +10,11 @@ # License for the specific language governing permissions and limitations # under the License. -from django.conf.urls import patterns # noqa from django.conf.urls import url # noqa from manila_ui.dashboards.admin.shares import views -urlpatterns = patterns( - '', +urlpatterns = [ url(r'^$', views.IndexView.as_view(), name='index'), url(r'^(?P[^/]+)/$', views.DetailView.as_view(), name='detail'), url(r'^snapshots/(?P[^/]+)$', @@ -49,4 +47,4 @@ urlpatterns = patterns( url(r'^manage$', views.ManageShareView.as_view(), name='manage'), url(r'^unmanage/(?P[^/]+)$', views.UnmanageShareView.as_view(), name='unmanage'), -) +] diff --git a/manila_ui/dashboards/project/shares/templates/shares/security_services/_add_security_service.html b/manila_ui/dashboards/project/shares/templates/shares/security_services/_add_security_service.html index 768ec73f..a241a9c4 100644 --- a/manila_ui/dashboards/project/shares/templates/shares/security_services/_add_security_service.html +++ b/manila_ui/dashboards/project/shares/templates/shares/security_services/_add_security_service.html @@ -1,6 +1,5 @@ {% extends "horizon/common/_modal_form.html" %} {% load i18n %} -{% load url from future %} {% block form_id %}{% endblock %} {% block form_action %}{% url 'horizon:project:shares:add_security_service' share_network.id %}{% endblock %} diff --git a/manila_ui/dashboards/project/shares/templates/shares/security_services/_detail_overview.html b/manila_ui/dashboards/project/shares/templates/shares/security_services/_detail_overview.html index ff300bdf..846c8775 100644 --- a/manila_ui/dashboards/project/shares/templates/shares/security_services/_detail_overview.html +++ b/manila_ui/dashboards/project/shares/templates/shares/security_services/_detail_overview.html @@ -1,5 +1,4 @@ {% load i18n sizeformat parse_date %} -{% load url from future %}

{% trans "Security Service Overview" %}

diff --git a/manila_ui/dashboards/project/shares/templates/shares/share_networks/_detail_overview.html b/manila_ui/dashboards/project/shares/templates/shares/share_networks/_detail_overview.html index 42c853a4..8f1d1baa 100644 --- a/manila_ui/dashboards/project/shares/templates/shares/share_networks/_detail_overview.html +++ b/manila_ui/dashboards/project/shares/templates/shares/share_networks/_detail_overview.html @@ -1,5 +1,4 @@ {% load i18n sizeformat parse_date %} -{% load url from future %}

{% trans "Share Network Overview" %}

diff --git a/manila_ui/dashboards/project/shares/templates/shares/share_networks/_share_network_update.html b/manila_ui/dashboards/project/shares/templates/shares/share_networks/_share_network_update.html index 24a6cd18..228e4dd1 100644 --- a/manila_ui/dashboards/project/shares/templates/shares/share_networks/_share_network_update.html +++ b/manila_ui/dashboards/project/shares/templates/shares/share_networks/_share_network_update.html @@ -1,6 +1,5 @@ {% extends "horizon/common/_modal_form.html" %} {% load i18n %} -{% load url from future %} {% block form_id %}{% endblock %} {% block form_action %}{% url 'horizon:project:shares:update_share_network' share_network.id %}{% endblock %} diff --git a/manila_ui/dashboards/project/shares/templates/shares/shares/_add_security_service.html b/manila_ui/dashboards/project/shares/templates/shares/shares/_add_security_service.html index 768ec73f..a241a9c4 100644 --- a/manila_ui/dashboards/project/shares/templates/shares/shares/_add_security_service.html +++ b/manila_ui/dashboards/project/shares/templates/shares/shares/_add_security_service.html @@ -1,6 +1,5 @@ {% extends "horizon/common/_modal_form.html" %} {% load i18n %} -{% load url from future %} {% block form_id %}{% endblock %} {% block form_action %}{% url 'horizon:project:shares:add_security_service' share_network.id %}{% endblock %} diff --git a/manila_ui/dashboards/project/shares/templates/shares/shares/_detail_overview.html b/manila_ui/dashboards/project/shares/templates/shares/shares/_detail_overview.html index 5ab65a89..df58192d 100644 --- a/manila_ui/dashboards/project/shares/templates/shares/shares/_detail_overview.html +++ b/manila_ui/dashboards/project/shares/templates/shares/shares/_detail_overview.html @@ -1,5 +1,4 @@ {% load i18n sizeformat parse_date %} -{% load url from future %}

{% trans "Share Overview" %}

diff --git a/manila_ui/dashboards/project/shares/templates/shares/shares/_update_metadata.html b/manila_ui/dashboards/project/shares/templates/shares/shares/_update_metadata.html index ec72e567..28289dac 100644 --- a/manila_ui/dashboards/project/shares/templates/shares/shares/_update_metadata.html +++ b/manila_ui/dashboards/project/shares/templates/shares/shares/_update_metadata.html @@ -1,6 +1,5 @@ {% extends "horizon/common/_modal_form.html" %} {% load i18n %} -{% load url from future %} {% block form_id %}{% endblock %} {% block form_action %}{% url 'horizon:project:shares:update_metadata' share.id %}{% endblock %} diff --git a/manila_ui/dashboards/project/shares/templates/shares/snapshots/_snapshot_detail_overview.html b/manila_ui/dashboards/project/shares/templates/shares/snapshots/_snapshot_detail_overview.html index d379f86a..1f00bdf0 100644 --- a/manila_ui/dashboards/project/shares/templates/shares/snapshots/_snapshot_detail_overview.html +++ b/manila_ui/dashboards/project/shares/templates/shares/snapshots/_snapshot_detail_overview.html @@ -1,5 +1,4 @@ {% load i18n sizeformat parse_date %} -{% load url from future %}

{% trans "Snapshot Overview" %}

diff --git a/manila_ui/dashboards/project/shares/urls.py b/manila_ui/dashboards/project/shares/urls.py index 31b12adc..414345e8 100644 --- a/manila_ui/dashboards/project/shares/urls.py +++ b/manila_ui/dashboards/project/shares/urls.py @@ -12,7 +12,6 @@ # License for the specific language governing permissions and limitations # under the License. -from django.conf.urls import patterns # noqa from django.conf.urls import url # noqa from manila_ui.dashboards.project.shares.security_services \ @@ -26,8 +25,7 @@ from manila_ui.dashboards.project.shares.snapshots\ from manila_ui.dashboards.project.shares import views -urlpatterns = patterns( - 'openstack_dashboard.dashboards.project.shares.views', +urlpatterns = [ url(r'^$', views.IndexView.as_view(), name='index'), url(r'^\?tab=share_tabs__snapshots_tab$', views.IndexView.as_view(), @@ -78,4 +76,4 @@ urlpatterns = patterns( url(r'^(?P[^/]+)/extend/$', shares_views.ExtendView.as_view(), name='extend'), -) +] diff --git a/manila_ui/tests/helpers.py b/manila_ui/tests/helpers.py index 1f7ab029..29329542 100644 --- a/manila_ui/tests/helpers.py +++ b/manila_ui/tests/helpers.py @@ -11,10 +11,9 @@ # License for the specific language governing permissions and limitations # under the License. -import os - -from django.utils import unittest import mock +import os +import unittest from manila_ui import api from manila_ui.tests.test_data import utils diff --git a/manila_ui/tests/urls.py b/manila_ui/tests/urls.py index 9bef20ff..cf28475d 100644 --- a/manila_ui/tests/urls.py +++ b/manila_ui/tests/urls.py @@ -14,7 +14,6 @@ from django.conf import urls import openstack_dashboard.urls -urlpatterns = urls.patterns( - '', +urlpatterns = [ urls.url(r'', urls.include(openstack_dashboard.urls)) -) +] diff --git a/tox.ini b/tox.ini index 8b048853..bdc070b2 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] minversion = 1.6 -envlist = py27,pep8,py27dj14 +envlist = py27,pep8,py27dj19 skipsdist = True [testenv] @@ -21,11 +21,6 @@ commands = flake8 [testenv:venv] commands = {posargs} -[testenv:py27dj14] -basepython = python2.7 -commands = pip install django>=1.4,<1.5 - /bin/bash run_tests.sh -N --no-pep8 {posargs} - [testenv:py27dj17] basepython = python2.7 commands = pip install django>=1.7,<1.8 @@ -37,6 +32,16 @@ basepython = python2.7 commands = pip install django>=1.8,<1.9 /bin/bash run_tests.sh -N --no-pep8 {posargs} +[testenv:py27dj19] +basepython = python2.7 +commands = pip install django>=1.9,<1.10 + /bin/bash run_tests.sh -N --no-pep8 {posargs} + +[testenv:py27dj110] +basepython = python2.7 +commands = pip install django<1.11 --pre --upgrade + /bin/bash run_tests.sh -N --no-pep8 {posargs} + [testenv:cover] commands = {toxinidir}/tools/cover.sh {posargs}