Author: jezdez
Date: 2011-07-26 01:27:23 -0700 (Tue, 26 Jul 2011)
New Revision: 16552

Modified:
   django/trunk/django/contrib/auth/tests/views.py
Log:
Fixed #16413 -- Stopped an auth test from failing if LOGIN_URL is set to a 
non-default value. Thanks, Aymeric Augustin.

Modified: django/trunk/django/contrib/auth/tests/views.py
===================================================================
--- django/trunk/django/contrib/auth/tests/views.py     2011-07-25 22:18:59 UTC 
(rev 16551)
+++ django/trunk/django/contrib/auth/tests/views.py     2011-07-26 08:27:23 UTC 
(rev 16552)
@@ -205,9 +205,10 @@
         
self.assertTrue(response['Location'].endswith('/password_change/done/'))
 
     def test_password_change_done_fails(self):
-        response = self.client.get('/password_change/done/')
-        self.assertEqual(response.status_code, 302)
-        
self.assertTrue(response['Location'].endswith('/login/?next=/password_change/done/'))
+        with self.settings(LOGIN_URL='/login/'):
+            response = self.client.get('/password_change/done/')
+            self.assertEqual(response.status_code, 302)
+            
self.assertTrue(response['Location'].endswith('/login/?next=/password_change/done/'))
 
 
 class LoginTest(AuthViewsTestCase):

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to