Skip to content

Commit 945cf56

Browse files
authored
Tests: use a faster password hasher (#11462)
Should save us some seconds at least. https://docs.djangoproject.com/en/5.0/topics/testing/overview/#speeding-up-the-tests
1 parent 3456794 commit 945cf56

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

readthedocs/core/fixtures/eric.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"last_login": "2010-08-14T01:51:05+00:00",
1313
"groups": [],
1414
"user_permissions": [],
15-
"password": "pbkdf2_sha256$30000$Vs87OlKZEzCb$nUw1o5pGQw7ff/QhnleSpUOupBaT1DogZrVaoZyQRyc=",
15+
"password": "md5$HLrlTqy6uMMO08qQZ75Z4K$65492930ade63899137c23db46cb2253",
1616
"email": "[email protected]",
1717
"date_joined": "2010-08-14T01:50:58+00:00"
1818
}
@@ -30,7 +30,7 @@
3030
"last_login": "2010-08-14T01:51:05+00:00",
3131
"groups": [],
3232
"user_permissions": [],
33-
"password": "pbkdf2_sha256$30000$Vs87OlKZEzCb$nUw1o5pGQw7ff/QhnleSpUOupBaT1DogZrVaoZyQRyc=",
33+
"password": "md5$HLrlTqy6uMMO08qQZ75Z4K$65492930ade63899137c23db46cb2253",
3434
"email": "[email protected]",
3535
"date_joined": "2010-08-14T01:50:58+00:00"
3636
}
@@ -48,7 +48,7 @@
4848
"last_login": "2010-08-14T01:51:05+00:00",
4949
"groups": [],
5050
"user_permissions": [],
51-
"password": "pbkdf2_sha256$30000$Vs87OlKZEzCb$nUw1o5pGQw7ff/QhnleSpUOupBaT1DogZrVaoZyQRyc=",
51+
"password": "md5$HLrlTqy6uMMO08qQZ75Z4K$65492930ade63899137c23db46cb2253",
5252
"email": "[email protected]",
5353
"date_joined": "2010-08-14T01:50:58+00:00"
5454
}

readthedocs/settings/test.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ class CommunityTestSettings(CommunityBaseSettings):
3737
}
3838
}
3939

40+
# Speed up tests by using a fast password hasher.
41+
# https://docs.djangoproject.com/en/5.0/topics/testing/overview/#speeding-up-the-tests.
42+
PASSWORD_HASHERS = [
43+
"django.contrib.auth.hashers.MD5PasswordHasher",
44+
]
45+
4046
@property
4147
def DATABASES(self): # noqa
4248
return {

0 commit comments

Comments
 (0)