diff options
| author | Bang Dao + Tam Huynh <bang.dao+tam.huynh@eastagile.com> | 2016-06-16 17:06:59 +0700 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-06-24 10:37:38 -0400 |
| commit | 09119dff14ad24d53ac0273e5cd2de24de0b0d81 (patch) | |
| tree | c3501f95b837ec7c497270adfb369b3ec10f672e /tests/auth_tests | |
| parent | 7e303d15c349401f54761a616acdb20924600da9 (diff) | |
Fixed #26719 -- Normalized email in AbstractUser.clean().
Diffstat (limited to 'tests/auth_tests')
| -rw-r--r-- | tests/auth_tests/test_models.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/auth_tests/test_models.py b/tests/auth_tests/test_models.py index 7967306c43..5f66a48141 100644 --- a/tests/auth_tests/test_models.py +++ b/tests/auth_tests/test_models.py @@ -194,6 +194,11 @@ class AbstractUserTestCase(TestCase): user2 = User.objects.create_user(username='user2') self.assertIsNone(user2.last_login) + def test_user_clean_normalize_email(self): + user = User(username='user', password='foo', email='foo@BAR.com') + user.clean() + self.assertEqual(user.email, 'foo@bar.com') + def test_user_double_save(self): """ Calling user.save() twice should trigger password_changed() once. |
