From: Thomas Goirand Date: Mon, 21 Mar 2016 14:27:28 +0000 (+0000) Subject: Updated the Django 1.9 patch again. X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=dce33790560b1227c5de434881d93d0c0ff71e4e;p=openstack-build%2Fhorizon-build.git Updated the Django 1.9 patch again. Rewritten-From: 4fe6fcfcfaddf56117d892d8defa0b2fc276cdab --- diff --git a/trusty/debian/patches/Fix_remaining_Django_1.9_test_failures.patch b/trusty/debian/patches/Fix_remaining_Django_1.9_test_failures.patch index 39ed60c..0bd022e 100644 --- a/trusty/debian/patches/Fix_remaining_Django_1.9_test_failures.patch +++ b/trusty/debian/patches/Fix_remaining_Django_1.9_test_failures.patch @@ -461,6 +461,43 @@ index 4e5e357..389e909 100644 @test.create_stubs({api.cinder: ('volume_backup_get', 'volume_get')}) def test_volume_backup_detail_get(self): +diff --git a/openstack_dashboard/dashboards/project/volumes/cgroups/tests.py b/openstack_dashboard/dashboards/project/volumes/cgroups/tests.py +index b0eacb3..b608cca 100644 +--- a/openstack_dashboard/dashboards/project/volumes/cgroups/tests.py ++++ b/openstack_dashboard/dashboards/project/volumes/cgroups/tests.py +@@ -10,8 +10,10 @@ + # License for the specific language governing permissions and limitations + # under the License. + ++import django + from django.core.urlresolvers import reverse + from django import http ++from django.utils.http import urlunquote # noqa + from mox3.mox import IsA # noqa + + from openstack_dashboard.api import cinder +@@ -19,7 +21,8 @@ from openstack_dashboard.test import helpers as test + + + VOLUME_INDEX_URL = reverse('horizon:project:volumes:index') +-VOLUME_CGROUPS_TAB_URL = reverse('horizon:project:volumes:cgroups_tab') ++VOLUME_CGROUPS_TAB_URL = urlunquote(reverse( ++ 'horizon:project:volumes:cgroups_tab')) + + + class ConsistencyGroupTests(test.TestCase): +@@ -111,8 +114,9 @@ class ConsistencyGroupTests(test.TestCase): + AndReturn(cgroups) + cinder.volume_cgroup_delete(IsA(http.HttpRequest), cgroup.id, + force=False) +- cinder.volume_cgroup_list_with_vol_type_names(IsA(http.HttpRequest)).\ +- AndReturn(cgroups) ++ if django.VERSION < (1, 9): ++ cinder.volume_cgroup_list_with_vol_type_names( ++ IsA(http.HttpRequest)).AndReturn(cgroups) + + self.mox.ReplayAll() + diff --git a/openstack_dashboard/dashboards/project/volumes/snapshots/tests.py b/openstack_dashboard/dashboards/project/volumes/snapshots/tests.py index a8cc741..d7975b5 100644 --- a/openstack_dashboard/dashboards/project/volumes/snapshots/tests.py