Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #10976 -- Isolated contrib.auth tests so they will always pass,…

… regardless of any local templates. Thanks to aarond10 for the report, and SmileyChris for turning that into a patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@12420 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit b794441951f7328bbe5bcac305386862fd88f967 1 parent 7985780
Russell Keith-Magee authored February 13, 2010
1  django/contrib/auth/tests/templates/registration/password_reset_complete.html
... ...
@@ -0,0 +1 @@
  1
+Password reset successfully
5  django/contrib/auth/tests/templates/registration/password_reset_confirm.html
... ...
@@ -0,0 +1,5 @@
  1
+{% if validlink %}
  2
+Please enter your new password: {{ form }}
  3
+{% else %}
  4
+The password reset link was invalid
  5
+{% endif %}
1  django/contrib/auth/tests/templates/registration/password_reset_done.html
... ...
@@ -0,0 +1 @@
  1
+E-mail sent
1  django/contrib/auth/tests/templates/registration/password_reset_email.html
... ...
@@ -0,0 +1 @@
  1
+{{ protocol }}://{{ domain }}/reset/{{ uid }}-{{ token }}/
1  django/contrib/auth/tests/templates/registration/password_reset_form.html
... ...
@@ -0,0 +1 @@
  1
+{{ form }}
10  django/contrib/auth/tests/views.py
@@ -37,16 +37,6 @@ def tearDown(self):
37 37
 
38 38
 class PasswordResetTest(AuthViewsTestCase):
39 39
 
40  
-    def setUp(self):
41  
-        self.old_LANGUAGES = settings.LANGUAGES
42  
-        self.old_LANGUAGE_CODE = settings.LANGUAGE_CODE
43  
-        settings.LANGUAGES = (('en', 'English'),)
44  
-        settings.LANGUAGE_CODE = 'en'
45  
-
46  
-    def tearDown(self):
47  
-        settings.LANGUAGES = self.old_LANGUAGES
48  
-        settings.LANGUAGE_CODE = self.old_LANGUAGE_CODE
49  
-
50 40
     def test_email_not_found(self):
51 41
         "Error is raised if the provided email address isn't currently registered"
52 42
         response = self.client.get('/password_reset/')

0 notes on commit b794441

Please sign in to comment.
Something went wrong with that request. Please try again.