Tests / ft/tests.py
TestAccountSettings::test_change_password
First seen 3 weeks, 6 days ago in 78a4357
CI
github-actions:test
15 runs
Average
1.00 s
median 1.07 s
max 1.46 s
max 1.46 s
Phases
Setup 197 ms
Call 807 ms
Teardown 0.17 ms
Categories
Password hashing 965 ms
Database 25 ms
Other (Libraries, Templates, pytest, Unsampled) 15 ms
39 database queries per run
Needs 47 KB of memory (max 264 KB)
Duration per run
Where the time goes
Latest run in ci:github-actions:test, 10 hours ago ·
open run
setup165 ms19.8%
TestCase.setUpClassdjango/test/testcases.py:1439 cls.setUpTestData()158 ms19.0%
TestAccountSettings.setUpTestDataft/tests.py:182 cls.user = User.objects.create_user("anze", email="[email protected]", password="correct horse battery")157 ms18.8%
UserManager.create_userdjango/contrib/auth/models.py:175157 ms18.8%
UserManager._create_userdjango/contrib/auth/models.py:162155 ms18.6%
UserManager._create_user_objectdjango/contrib/auth/models.py:155155 ms18.6%
make_passworddjango/contrib/auth/hashers.py:119155 ms18.6%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:335155 ms18.6%
pbkdf2django/utils/crypto.py:77155 ms18.6%
1 smaller frames hidden
1 smaller frames hidden
TestCase.setUpClassdjango/test/testcases.py:1423 cls.cls_atomics = cls._enter_atomics()7 ms0.8%
TestCase._enter_atomicsdjango/test/testcases.py:13967 ms0.8%
Atomic.__enter__django/db/transaction.py:1987 ms0.8%
BaseDatabaseWrapper.get_autocommitdjango/db/backends/base/base.py:4547 ms0.8%
SimpleTestCase.ensure_connection_patch_method.<locals>.patched_ensure_connectiondjango/test/testcases.py:3037 ms0.8%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:267 ms0.8%
BaseDatabaseWrapper.ensure_connectiondjango/db/backends/base/base.py:2797 ms0.8%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:267 ms0.8%
BaseDatabaseWrapper.connectdjango/db/backends/base/base.py:2567 ms0.8%
DatabaseWrapper.get_new_connectionft/db/postgresql/base.py:39 return super().get_new_connection(conn_params)7 ms0.8%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:267 ms0.8%
DatabaseWrapper.get_new_connectiondjango/db/backends/postgresql/base.py:3337 ms0.8%
Connection.connectpsycopg/connection.py:1097 ms0.8%
call670 ms80.2%
TestAccountSettings.test_change_passwordft/tests.py:210 response = self.client.post(327 ms39.2%
Client.postdjango/test/client.py:1153327 ms39.2%
RequestFactory.postdjango/test/client.py:499327 ms39.2%
RequestFactory.genericdjango/test/client.py:671327 ms39.2%
Client.requestdjango/test/client.py:1082327 ms39.2%
ClientHandler.__call__django/test/client.py:186327 ms39.2%
BaseHandler.get_responsedjango/core/handlers/base.py:141327 ms39.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:55327 ms39.2%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:130327 ms39.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:55327 ms39.2%
MiddlewareMixin.__call__django/utils/deprecation.py:309327 ms39.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:55327 ms39.2%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:123327 ms39.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:55327 ms39.2%
MiddlewareMixin.__call__django/utils/deprecation.py:309326 ms39.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:55326 ms39.0%
MiddlewareMixin.__call__django/utils/deprecation.py:309326 ms39.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:55326 ms39.0%
MiddlewareMixin.__call__django/utils/deprecation.py:309326 ms39.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:55326 ms39.0%
MiddlewareMixin.__call__django/utils/deprecation.py:309326 ms39.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:55326 ms39.0%
MiddlewareMixin.__call__django/utils/deprecation.py:309326 ms39.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:55326 ms39.0%
MiddlewareMixin.__call__django/utils/deprecation.py:309326 ms39.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:55326 ms39.0%
AccountMiddleware.<locals>.middlewareallauth/account/middleware.py:34326 ms39.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:55326 ms39.0%
BaseHandler._get_responsedjango/core/handlers/base.py:198326 ms39.0%
View.as_view.<locals>.viewdjango/views/generic/base.py:106326 ms39.0%
_multi_decorate.<locals>._wrapperdjango/utils/decorators.py:48326 ms39.0%
user_passes_test.<locals>.decorator.<locals>._view_wrapperdjango/contrib/auth/decorators.py:59325 ms38.9%
_multi_decorate.<locals>._wrapperdjango/utils/decorators.py:48325 ms38.9%
rate_limit.<locals>.decorator.<locals>.wrapallauth/decorators.py:12325 ms38.9%
_multi_decorate.<locals>._wrapperdjango/utils/decorators.py:48325 ms38.9%
sensitive_post_parameters.<locals>.decorator.<locals>.sensitive_post_parameters_wrapperdjango/views/decorators/debug.py:143325 ms38.9%
PasswordChangeView.dispatchallauth/account/views.py:503325 ms38.9%
View.dispatchdjango/views/generic/base.py:145325 ms38.9%
AjaxCapableProcessFormViewMixin.postallauth/account/mixins.py:82165 ms19.8%
PasswordChangeView.form_validallauth/account/views.py:514163 ms19.5%
ChangePasswordForm.saveallauth/account/forms.py:606163 ms19.5%
change_passwordallauth/account/internal/flows/password_change.py:12163 ms19.5%
DefaultAccountAdapter.set_passwordallauth/account/adapter.py:579161 ms19.3%
AbstractBaseUser.set_passworddjango/contrib/auth/base_user.py:94161 ms19.3%
make_passworddjango/contrib/auth/hashers.py:119161 ms19.3%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:335161 ms19.3%
pbkdf2django/utils/crypto.py:77161 ms19.3%
1 smaller frames hidden
1 smaller frames hidden
AjaxCapableProcessFormViewMixin.postallauth/account/mixins.py:81160 ms19.2%
BaseForm.is_validdjango/forms/forms.py:206160 ms19.2%
BaseForm.errorsdjango/forms/forms.py:201160 ms19.2%
BaseForm.full_cleandjango/forms/forms.py:337160 ms19.2%
BaseForm._clean_fieldsdjango/forms/forms.py:347160 ms19.2%
ChangePasswordForm.clean_oldpasswordallauth/account/forms.py:601160 ms19.2%
AbstractBaseUser.check_passworddjango/contrib/auth/base_user.py:109160 ms19.2%
check_passworddjango/contrib/auth/hashers.py:83160 ms19.2%
verify_passworddjango/contrib/auth/hashers.py:63160 ms19.2%
PBKDF2PasswordHasher.verifydjango/contrib/auth/hashers.py:351160 ms19.2%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:335160 ms19.2%
pbkdf2django/utils/crypto.py:77160 ms19.2%
1 smaller frames hidden
1 smaller frames hidden
TestAccountSettings.test_change_passwordft/tests.py:205 response = self.client.post(162 ms19.4%
Client.postdjango/test/client.py:1153162 ms19.4%
RequestFactory.postdjango/test/client.py:499162 ms19.4%
RequestFactory.genericdjango/test/client.py:671162 ms19.4%
Client.requestdjango/test/client.py:1082162 ms19.4%
ClientHandler.__call__django/test/client.py:186162 ms19.4%
BaseHandler.get_responsedjango/core/handlers/base.py:141162 ms19.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:55162 ms19.4%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:130162 ms19.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:55162 ms19.4%
MiddlewareMixin.__call__django/utils/deprecation.py:309162 ms19.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:55162 ms19.4%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:123162 ms19.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:55162 ms19.4%
MiddlewareMixin.__call__django/utils/deprecation.py:309162 ms19.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:55162 ms19.4%
MiddlewareMixin.__call__django/utils/deprecation.py:309162 ms19.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:55162 ms19.4%
MiddlewareMixin.__call__django/utils/deprecation.py:309162 ms19.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:55162 ms19.4%
MiddlewareMixin.__call__django/utils/deprecation.py:309162 ms19.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:55162 ms19.4%
MiddlewareMixin.__call__django/utils/deprecation.py:309162 ms19.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:55162 ms19.4%
MiddlewareMixin.__call__django/utils/deprecation.py:309162 ms19.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:55162 ms19.4%
AccountMiddleware.<locals>.middlewareallauth/account/middleware.py:34162 ms19.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:55162 ms19.4%
BaseHandler._get_responsedjango/core/handlers/base.py:198160 ms19.2%
View.as_view.<locals>.viewdjango/views/generic/base.py:106160 ms19.2%
_multi_decorate.<locals>._wrapperdjango/utils/decorators.py:48160 ms19.2%
user_passes_test.<locals>.decorator.<locals>._view_wrapperdjango/contrib/auth/decorators.py:59160 ms19.2%
_multi_decorate.<locals>._wrapperdjango/utils/decorators.py:48160 ms19.2%
rate_limit.<locals>.decorator.<locals>.wrapallauth/decorators.py:12160 ms19.2%
_multi_decorate.<locals>._wrapperdjango/utils/decorators.py:48160 ms19.2%
sensitive_post_parameters.<locals>.decorator.<locals>.sensitive_post_parameters_wrapperdjango/views/decorators/debug.py:143160 ms19.2%
PasswordChangeView.dispatchallauth/account/views.py:503160 ms19.2%
View.dispatchdjango/views/generic/base.py:145160 ms19.2%
AjaxCapableProcessFormViewMixin.postallauth/account/mixins.py:81160 ms19.2%
BaseForm.is_validdjango/forms/forms.py:206160 ms19.2%
BaseForm.errorsdjango/forms/forms.py:201160 ms19.2%
BaseForm.full_cleandjango/forms/forms.py:337160 ms19.2%
BaseForm._clean_fieldsdjango/forms/forms.py:347160 ms19.2%
ChangePasswordForm.clean_oldpasswordallauth/account/forms.py:601160 ms19.2%
AbstractBaseUser.check_passworddjango/contrib/auth/base_user.py:109160 ms19.2%
check_passworddjango/contrib/auth/hashers.py:83160 ms19.2%
verify_passworddjango/contrib/auth/hashers.py:63160 ms19.2%
PBKDF2PasswordHasher.verifydjango/contrib/auth/hashers.py:351160 ms19.2%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:335160 ms19.2%
pbkdf2django/utils/crypto.py:77160 ms19.2%
1 smaller frames hidden
TestAccountSettings.test_change_passwordft/tests.py:220 self.assertTrue(self.user.check_password("staple battery horse"))160 ms19.2%
AbstractBaseUser.check_passworddjango/contrib/auth/base_user.py:109160 ms19.2%
check_passworddjango/contrib/auth/hashers.py:83160 ms19.2%
verify_passworddjango/contrib/auth/hashers.py:63160 ms19.2%
PBKDF2PasswordHasher.verifydjango/contrib/auth/hashers.py:351160 ms19.2%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:335160 ms19.2%
pbkdf2django/utils/crypto.py:77160 ms19.2%
TestAccountSettings.test_change_passwordft/tests.py:203 response = self.client.get(reverse("account_change_password"))11 ms1.4%
Client.getdjango/test/client.py:112411 ms1.4%
RequestFactory.getdjango/test/client.py:47511 ms1.4%
RequestFactory.genericdjango/test/client.py:67111 ms1.4%
Client.requestdjango/test/client.py:108211 ms1.4%
ClientHandler.__call__django/test/client.py:1737 ms0.9%
BaseHandler.load_middlewaredjango/core/handlers/base.py:627 ms0.9%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:1047 ms0.9%
WhiteNoise.add_fileswhitenoise/base.py:1087 ms0.9%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1206 ms0.7%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:1316 ms0.7%
WhiteNoise.get_static_filewhitenoise/base.py:2085 ms0.6%
1 smaller frames hidden
1 smaller frames hidden
1 smaller frames hidden
TestAccountSettings.setUpft/tests.py:186 self.client.force_login(self.user)5 ms0.6%
ClientMixin.force_logindjango/test/client.py:8555 ms0.6%
2 smaller frames hidden
Estimated from 814 samples; phase durations are exact. Frames from pytest and pluggy are
hidden
.
Hot lines in your code
|
ft/tests.py:210
response = self.client.post(
TestAccountSettings.test_change_password
· Password hashing
|
327 ms |
|
ft/tests.py:205
response = self.client.post(
TestAccountSettings.test_change_password
· Password hashing
|
162 ms |
|
ft/tests.py:220
self.assertTrue(self.user.check_password("staple battery horse"))
TestAccountSettings.test_change_password
· Password hashing
|
160 ms |
|
ft/tests.py:182
cls.user = User.objects.create_user("anze", email="[email protected]", password="correct horse battery")
TestAccountSettings.setUpTestData
· Password hashing
|
157 ms |
|
ft/tests.py:203
response = self.client.get(reverse("account_change_password"))
TestAccountSettings.test_change_password
· Libraries
|
11 ms |
|
ft/db/postgresql/base.py:39
return super().get_new_connection(conn_params)
DatabaseWrapper.get_new_connection
· Database
|
7 ms |
|
ft/tests.py:186
self.client.force_login(self.user)
TestAccountSettings.setUp
· Database
|
5 ms |
|
ft/tests.py:209
self.assertContains(response, "Please type your current password.")
TestAccountSettings.test_change_password
· Libraries
|
2 ms |
|
ft/tests.py:183
EmailAddress.objects.create(user=cls.user, email="[email protected]", primary=True, verified=True)
TestAccountSettings.setUpTestData
· Database
|
1 ms |
Fixtures
Exact setup time| _unittest_setUpClass_fixture_TestAccountSettings class | 164 ms |
| _django_setup_unittest class | 0.24 ms |
| _dj_autoclear_mailbox function | 0.05 ms |
| _django_db_marker function | 0.03 ms |
| _template_string_if_invalid_marker function | 0.03 ms |
| _django_set_urlconf function | 0.03 ms |
| _live_server_helper function | 0.03 ms |
| _django_clear_site_cache function | 0.02 ms |
| monkeypatch function | 0.02 ms |
Database
39 queries · 11 ms
Repeated queries are usually N+1 lookups: fetch them once with select_related / prefetch_related (or selectinload).
4×
SELECT "django_session"."session_key", "django_session"."session_data", "django_session"."expire_date" FROM "django_session" WHERE ("django_session"."expire_date" > %s AND "django_session"."session_key" = %s) LIMIT ?
4×
SELECT "auth_user"."id", "auth_user"."password", "auth_user"."last_login", "auth_user"."is_superuser", "auth_user"."username", "auth_user"."first_name", "auth_user"."last_name", "auth_user"."email", "auth_user"."is_staff", "auth_user"."is_active", "auth_user"."date_joined" FROM "auth_user" WHERE "a…
3×
SELECT %s AS "a" FROM "django_session" WHERE "django_session"."session_key" = %s LIMIT ?
3×
INSERT INTO "django_session" ("session_key", "session_data", "expire_date") VALUES (%s, %s, %s)
Biggest pieces of work
|
call test body
ft/tests.py:210
|
662 ms |
|
setup setUpClass
django/test/testcases.py:1439
|
165 ms |
|
call setUp
ft/tests.py:186
|
5 ms |
| call pytest internals | 1 ms |
|
call _post_teardown
django/test/testcases.py:1240
|
1 ms |
Reliability
15 results · 0 CI failures · 0 local failuresThis test hasn't failed recently.
History
Latest 15 results, oldest first in the strip| When | Environment | Outcome | Duration | |
|---|---|---|---|---|
| 10 hours ago | CI github-actions:test | passed | 835 ms | Profile |
| 3 days, 20 hours ago | CI github-actions:test | passed | 1.15 s | Profile |
| 5 days, 20 hours ago | CI github-actions:test | passed | 662 ms | Profile |
| 6 days, 20 hours ago | CI github-actions:test | passed | 1.23 s | Profile |
| 2 weeks, 4 days ago | CI github-actions:test | passed | 675 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 1.12 s | Profile |
| 3 weeks ago | CI github-actions:test | passed | 866 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 1.07 s | Profile |
| 3 weeks, 1 day ago | CI github-actions:test | passed | 744 ms | Profile |
| 3 weeks, 4 days ago | CI github-actions:test | passed | 1.07 s | Profile |
| 3 weeks, 5 days ago | CI github-actions:test | passed | 1.09 s | Profile |
| 3 weeks, 5 days ago | CI github-actions:test | passed | 1.06 s | Profile |
| 3 weeks, 6 days ago | CI github-actions:test | passed | 1.32 s | Profile |
| 3 weeks, 6 days ago | CI github-actions:test | passed | 721 ms | Profile |
| 3 weeks, 6 days ago | CI github-actions:test | passed | 1.46 s | Profile |