Verified Commit e5a384dd authored by Baptiste Beauplat's avatar Baptiste Beauplat
Browse files

Add a test to cover password change failure

parent 30820466
...@@ -446,6 +446,16 @@ psCWDYcNhNTEmXgsDSqUlLrqqde/3hDynhWeAP9jk7QAnDToELBdyCe6HpGXLC3q ...@@ -446,6 +446,16 @@ psCWDYcNhNTEmXgsDSqUlLrqqde/3hDynhWeAP9jk7QAnDToELBdyCe6HpGXLC3q
# Login # Login
self.client.post(reverse('login'), self._AUTHDATA) self.client.post(reverse('login'), self._AUTHDATA)
# Test password change, failed
response = self.client.post(reverse('profile'), {
'old_password': 'not-my-password',
'new_password1': 'newpassword',
'new_password2': 'newpassword',
'commit_password': 'submit'
})
self.assertEquals(response.status_code, 200)
self.assertIn('errorlist', str(response.content))
# Test password change # Test password change
response = self.client.post(reverse('profile'), { response = self.client.post(reverse('profile'), {
'old_password': 'password', 'old_password': 'password',
......
Supports Markdown
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