diff options
author | Tim Graham <timograham@gmail.com> | 2016-02-05 15:56:52 -0500 |
---|---|---|
committer | Tim Graham <timograham@gmail.com> | 2016-02-06 08:47:21 -0500 |
commit | 015fad9060a8a6fb273a33b8e8457e504ed26131 (patch) | |
tree | dc56db72ffaea2acbe5925a10c95021f7a26df39 /tests/timezones | |
parent | f8e865d78f9acb1ad976cffffb207d66ff8cef72 (diff) | |
download | django-015fad9060a8a6fb273a33b8e8457e504ed26131.tar.gz |
Fixed #26175 -- Removed SHA1 password hashes in tests.
Diffstat (limited to 'tests/timezones')
-rw-r--r-- | tests/timezones/tests.py | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/tests/timezones/tests.py b/tests/timezones/tests.py index 97af0e729d..e803927d36 100644 --- a/tests/timezones/tests.py +++ b/tests/timezones/tests.py @@ -1200,16 +1200,19 @@ class NewFormsTests(TestCase): self.assertIn("2011-09-01 17:20:30", str(form)) -@override_settings(DATETIME_FORMAT='c', TIME_ZONE='Africa/Nairobi', USE_L10N=False, USE_TZ=True, - PASSWORD_HASHERS=['django.contrib.auth.hashers.SHA1PasswordHasher'], - ROOT_URLCONF='timezones.urls') +@override_settings( + DATETIME_FORMAT='c', + TIME_ZONE='Africa/Nairobi', + USE_L10N=False, + USE_TZ=True, + ROOT_URLCONF='timezones.urls', +) class AdminTests(TestCase): @classmethod def setUpTestData(cls): - # password = "secret" - cls.u1 = User.objects.create( - password='sha1$995a3$6011485ea3834267d719b4c801409b8b1ddd0158', + cls.u1 = User.objects.create_user( + password='secret', last_login=datetime.datetime(2007, 5, 30, 13, 20, 10, tzinfo=UTC), is_superuser=True, username='super', first_name='Super', last_name='User', email='super@example.com', is_staff=True, is_active=True, @@ -1217,7 +1220,7 @@ class AdminTests(TestCase): ) def setUp(self): - self.client.login(username='super', password='secret') + self.client.force_login(self.u1) @requires_tz_support def test_changelist(self): |