--- /dev/null
+Description: Fix another assertRedirects
+Author: Thomas Goirand <zigo@debian.org>
+Forwarded: no
+Last-Update: 2016-01-12
+
+--- horizon-8.0.0.orig/horizon/test/tests/base.py
++++ horizon-8.0.0/horizon/test/tests/base.py
+@@ -17,6 +17,7 @@
+ # License for the specific language governing permissions and limitations
+ # under the License.
+
++import django
+ from django.conf import settings
+ from django.contrib.auth.models import User # noqa
+ from django.core.exceptions import ImproperlyConfigured # noqa
+@@ -303,8 +304,12 @@ class HorizonTests(BaseHorizonTests):
+ dogs = horizon.get_dashboard("dogs")
+ puppies = dogs.get_panel("puppies")
+ url = puppies.get_absolute_url()
+- redirect_url = "?".join([settings.LOGIN_URL,
+- "next=%s" % url])
++ if django.get_version() >= '1.9':
++ redirect_url = "http://testserver" + "?".join([settings.LOGIN_URL,
++ "next=%s" % url])
++ else:
++ redirect_url = "?".join([settings.LOGIN_URL,
++ "next=%s" % url])
+
+ self.client.logout()
+ resp = self.client.get(url)
+@@ -316,6 +321,8 @@ class HorizonTests(BaseHorizonTests):
+
+ resp = self.client.get(url, HTTP_X_FORWARDED_PROTOCOL="https")
+ self.assertEqual(302, resp.status_code)
++ redirect_url = "?".join([settings.LOGIN_URL,
++ "next=%s" % url])
+ self.assertEqual('https://testserver:80%s' % redirect_url,
+ resp['location'])
+
+--- horizon-8.0.0.orig/horizon/test/tests/middleware.py
++++ horizon-8.0.0/horizon/test/tests/middleware.py
+@@ -15,6 +15,7 @@
+
+ import time
+
++import django
+ from django.conf import settings
+
+ from django.http import HttpResponseRedirect # noqa
+@@ -33,6 +34,8 @@ class MiddlewareTests(test.TestCase):
+ resp = mw.process_exception(request, exceptions.NotAuthorized())
+ resp.client = self.client
+
++ if django.get_version() >= '1.9':
++ url = "http://testserver" + url
+ self.assertRedirects(resp, url)
+
+ def test_session_timeout(self):