Commit 75be5e3c by Anthony Lenton

[r=elachuni] Fixes admin test where redirect url doesn't match as expected

parents b1bb5c26 5d21b8ed
...@@ -29,14 +29,12 @@ ...@@ -29,14 +29,12 @@
Tests for the django_openid_auth Admin login form replacement. Tests for the django_openid_auth Admin login form replacement.
""" """
import os
import unittest import unittest
from django.conf import settings from django.conf import settings
from django.contrib.auth.models import User, AnonymousUser from django.contrib.auth.models import User, AnonymousUser
settings.OPENID_USE_AS_ADMIN_LOGIN = True settings.OPENID_USE_AS_ADMIN_LOGIN = True
from django_openid_auth import admin
from django.test import TestCase from django.test import TestCase
...@@ -80,7 +78,8 @@ class SiteAdminTests(TestCase): ...@@ -80,7 +78,8 @@ class SiteAdminTests(TestCase):
""" """
response = self.client.get('/admin/') response = self.client.get('/admin/')
self.assertEqual(302, response.status_code) self.assertEqual(302, response.status_code)
self.assertEqual('http://testserver/openid/login/?next=/admin/', self.assertEqual('http://testserver' + getattr(settings, 'LOGIN_URL',
'/openid/login') + '?next=/admin/',
response['Location']) response['Location'])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment