~ubuntu-branches/ubuntu/saucy/python-django/saucy-updates

« back to all changes in this revision

Viewing changes to django/contrib/auth/tests/views.py

  • Committer: Bazaar Package Importer
  • Author(s): Scott James Remnant
  • Date: 2008-11-15 19:15:33 UTC
  • mto: This revision was merged to the branch mainline in revision 17.
  • Revision ID: james.westby@ubuntu.com-20081115191533-84v2zyjbmp1074ni
Tags: upstream-1.0.1
ImportĀ upstreamĀ versionĀ 1.0.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
        response = self.client.get('/password_reset/')
17
17
        self.assertEquals(response.status_code, 200)
18
18
        response = self.client.post('/password_reset/', {'email': 'not_a_real_email@email.com'})
19
 
        self.assertContains(response, "That e-mail address doesn't have an associated user account")
 
19
        self.assertContains(response, "That e-mail address doesn't have an associated user account")
20
20
        self.assertEquals(len(mail.outbox), 0)
21
21
 
22
22
    def test_email_found(self):
87
87
        response = self.client.post(path, {'new_password1': 'anewpassword',
88
88
                                           'new_password2':' x'})
89
89
        self.assertEquals(response.status_code, 200)
90
 
        self.assert_("The two password fields didn't match" in response.content)
 
90
        self.assert_("The two password fields didn't match" in response.content)
91
91
 
92
92
 
93
93
class ChangePasswordTest(TestCase):
147
147
            }
148
148
        )
149
149
        self.assertEquals(response.status_code, 200)
150
 
        self.assert_("The two password fields didn't match." in response.content)
 
150
        self.assert_("The two password fields didn't match." in response.content)
151
151
 
152
152
    def test_password_change_succeeds(self):
153
153
        self.login()