mirror of
https://github.com/wassname/flask-security.git
synced 2026-09-09 11:22:35 +08:00
Add a password-changed signal
This commit is contained in:
@@ -350,6 +350,16 @@ class ChangePasswordTest(SecurityTest):
|
||||
self.assertNotIn('You successfully changed your password', r.data)
|
||||
self.assertIn('Passwords do not match', r.data)
|
||||
|
||||
def test_change_password_bad_password(self):
|
||||
self.authenticate()
|
||||
r = self.client.post('/change', data={
|
||||
'password': 'password',
|
||||
'new_password': 'a',
|
||||
'new_password_confirm': 'a'
|
||||
}, follow_redirects=True)
|
||||
self.assertNotIn('You successfully changed your password', r.data)
|
||||
self.assertIn('Field must be between', r.data)
|
||||
|
||||
def test_change_password_success(self):
|
||||
self.authenticate()
|
||||
r = self.client.post('/change', data={
|
||||
|
||||
Reference in New Issue
Block a user