Skip to content
This repository has been archived by the owner on Jul 30, 2024. It is now read-only.

Commit

Permalink
Fix password_changed signal to behave like the other signals. Fixes #…
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Wright committed Mar 13, 2014
1 parent 9f00613 commit bc60c02
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion flask_security/changeable.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ def change_user_password(user, password):
user.password = encrypt_password(password)
_datastore.put(user)
send_password_changed_notice(user)
password_changed.send(user, app=app._get_current_object())
password_changed.send(app._get_current_object(), user=user)
4 changes: 2 additions & 2 deletions tests/signals_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,8 @@ def test_change_password(self):
calls = mocks[password_changed]
self.assertEqual(len(calls), 1)
args, kwargs = calls[0]
self.assertTrue(compare_user(args[0], user))
self.assertEqual(kwargs['app'], self.app)
self.assertTrue(compare_user(kwargs['user'], user))
self.assertEqual(args[0], self.app)

def test_change_password_invalid_password(self):
with capture_signals() as mocks:
Expand Down

0 comments on commit bc60c02

Please sign in to comment.