Fix password_changed signal to behave like the other signals. Fixes #222

This commit is contained in:
Matt Wright
2014-03-13 09:35:54 -04:00
parent 9f00613906
commit bc60c021a3
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -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)
+2 -2
View File
@@ -179,8 +179,8 @@ class ChangeableSignalsTests(SignalTest):
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: