flakytest.dev anze3db flakytest
Tests / ft/tests.py

TestAccountSettings::test_change_password

First seen 3 weeks ago in 78a4357
CI github-actions:test 12 runs
Average
1.03 s
median 1.07 s
max 1.46 s
Phases
Setup 203 ms Call 831 ms Teardown 0.18 ms
Categories
Password hashing 994 ms Database 25 ms Other (Libraries, Templates, pytest, Unsampled) 15 ms

39 database queries per run

Needs 45 KB of memory (max 264 KB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, 16 hours ago · open run
Show pytest frames
setup240 ms19.5%
TestCase.setUpClassdjango/test/testcases.py:1439 cls.setUpTestData()224 ms18.3%
TestAccountSettings.setUpTestDataft/tests.py:176 cls.user = User.objects.create_user("anze", email="[email protected]", password="correct horse battery")223 ms18.2%
UserManager.create_userdjango/contrib/auth/models.py:175223 ms18.2%
UserManager._create_userdjango/contrib/auth/models.py:162221 ms18.0%
UserManager._create_user_objectdjango/contrib/auth/models.py:155221 ms18.0%
make_passworddjango/contrib/auth/hashers.py:119221 ms18.0%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:335221 ms18.0%
pbkdf2django/utils/crypto.py:77221 ms18.0%
1 smaller frames hidden
1 smaller frames hidden
TestCase.setUpClassdjango/test/testcases.py:1423 cls.cls_atomics = cls._enter_atomics()16 ms1.3%
TestCase._enter_atomicsdjango/test/testcases.py:139616 ms1.3%
Atomic.__enter__django/db/transaction.py:19816 ms1.3%
BaseDatabaseWrapper.get_autocommitdjango/db/backends/base/base.py:45416 ms1.3%
SimpleTestCase.ensure_connection_patch_method.<locals>.patched_ensure_connectiondjango/test/testcases.py:30316 ms1.3%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2616 ms1.3%
BaseDatabaseWrapper.ensure_connectiondjango/db/backends/base/base.py:27916 ms1.3%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2616 ms1.3%
BaseDatabaseWrapper.connectdjango/db/backends/base/base.py:25616 ms1.3%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2616 ms1.3%
DatabaseWrapper.get_new_connectiondjango/db/backends/postgresql/base.py:33316 ms1.3%
Connection.connectpsycopg/connection.py:10916 ms1.3%
wait_connpsycopg/waiting.py:14514 ms1.1%
BaseConnection._connect_genpsycopg/_connection_base.py:43914 ms1.1%
2 smaller frames hidden
call988 ms80.4%
TestAccountSettings.test_change_passwordft/tests.py:204 response = self.client.post(479 ms39.0%
Client.postdjango/test/client.py:1153479 ms39.0%
RequestFactory.postdjango/test/client.py:499479 ms39.0%
RequestFactory.genericdjango/test/client.py:671479 ms39.0%
Client.requestdjango/test/client.py:1082479 ms39.0%
ClientHandler.__call__django/test/client.py:186479 ms39.0%
BaseHandler.get_responsedjango/core/handlers/base.py:141479 ms39.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:55479 ms39.0%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:130479 ms39.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:55479 ms39.0%
MiddlewareMixin.__call__django/utils/deprecation.py:309479 ms39.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:55479 ms39.0%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:123479 ms39.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:55479 ms39.0%
MiddlewareMixin.__call__django/utils/deprecation.py:309478 ms39.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:55478 ms39.0%
MiddlewareMixin.__call__django/utils/deprecation.py:309478 ms39.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:55478 ms39.0%
MiddlewareMixin.__call__django/utils/deprecation.py:309478 ms39.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:55478 ms39.0%
MiddlewareMixin.__call__django/utils/deprecation.py:309478 ms39.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:55478 ms39.0%
MiddlewareMixin.__call__django/utils/deprecation.py:309478 ms39.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:55478 ms39.0%
MiddlewareMixin.__call__django/utils/deprecation.py:309478 ms39.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:55478 ms39.0%
AccountMiddleware.<locals>.middlewareallauth/account/middleware.py:34478 ms39.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:55478 ms39.0%
BaseHandler._get_responsedjango/core/handlers/base.py:198478 ms39.0%
View.as_view.<locals>.viewdjango/views/generic/base.py:106478 ms39.0%
_multi_decorate.<locals>._wrapperdjango/utils/decorators.py:48478 ms39.0%
user_passes_test.<locals>.decorator.<locals>._view_wrapperdjango/contrib/auth/decorators.py:59474 ms38.6%
_multi_decorate.<locals>._wrapperdjango/utils/decorators.py:48474 ms38.6%
rate_limit.<locals>.decorator.<locals>.wrapallauth/decorators.py:12473 ms38.5%
_multi_decorate.<locals>._wrapperdjango/utils/decorators.py:48473 ms38.5%
sensitive_post_parameters.<locals>.decorator.<locals>.sensitive_post_parameters_wrapperdjango/views/decorators/debug.py:143473 ms38.5%
PasswordChangeView.dispatchallauth/account/views.py:503473 ms38.5%
View.dispatchdjango/views/generic/base.py:145473 ms38.5%
AjaxCapableProcessFormViewMixin.postallauth/account/mixins.py:81237 ms19.3%
BaseForm.is_validdjango/forms/forms.py:206237 ms19.3%
BaseForm.errorsdjango/forms/forms.py:201237 ms19.3%
BaseForm.full_cleandjango/forms/forms.py:337237 ms19.3%
BaseForm._clean_fieldsdjango/forms/forms.py:347237 ms19.3%
ChangePasswordForm.clean_oldpasswordallauth/account/forms.py:601237 ms19.3%
AbstractBaseUser.check_passworddjango/contrib/auth/base_user.py:109237 ms19.3%
check_passworddjango/contrib/auth/hashers.py:83237 ms19.3%
verify_passworddjango/contrib/auth/hashers.py:63237 ms19.3%
PBKDF2PasswordHasher.verifydjango/contrib/auth/hashers.py:351237 ms19.3%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:335237 ms19.3%
pbkdf2django/utils/crypto.py:77237 ms19.3%
AjaxCapableProcessFormViewMixin.postallauth/account/mixins.py:82236 ms19.2%
PasswordChangeView.form_validallauth/account/views.py:514234 ms19.1%
ChangePasswordForm.saveallauth/account/forms.py:606234 ms19.1%
change_passwordallauth/account/internal/flows/password_change.py:12234 ms19.1%
DefaultAccountAdapter.set_passwordallauth/account/adapter.py:579233 ms19.0%
AbstractBaseUser.set_passworddjango/contrib/auth/base_user.py:94233 ms19.0%
make_passworddjango/contrib/auth/hashers.py:119233 ms19.0%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:335233 ms19.0%
pbkdf2django/utils/crypto.py:77233 ms19.0%
1 smaller frames hidden
1 smaller frames hidden
1 smaller frames hidden
1 smaller frames hidden
1 smaller frames hidden
TestAccountSettings.test_change_passwordft/tests.py:199 response = self.client.post(252 ms20.5%
Client.postdjango/test/client.py:1153252 ms20.5%
RequestFactory.postdjango/test/client.py:499252 ms20.5%
RequestFactory.genericdjango/test/client.py:671252 ms20.5%
Client.requestdjango/test/client.py:1082252 ms20.5%
ClientHandler.__call__django/test/client.py:186252 ms20.5%
BaseHandler.get_responsedjango/core/handlers/base.py:141252 ms20.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:55252 ms20.5%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:130252 ms20.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:55252 ms20.5%
MiddlewareMixin.__call__django/utils/deprecation.py:309252 ms20.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:55252 ms20.5%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:123252 ms20.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:55252 ms20.5%
MiddlewareMixin.__call__django/utils/deprecation.py:309252 ms20.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:55252 ms20.5%
MiddlewareMixin.__call__django/utils/deprecation.py:309252 ms20.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:55252 ms20.5%
MiddlewareMixin.__call__django/utils/deprecation.py:309252 ms20.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:55252 ms20.5%
MiddlewareMixin.__call__django/utils/deprecation.py:309252 ms20.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:55252 ms20.5%
MiddlewareMixin.__call__django/utils/deprecation.py:309252 ms20.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:55252 ms20.5%
MiddlewareMixin.__call__django/utils/deprecation.py:309252 ms20.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:55252 ms20.5%
AccountMiddleware.<locals>.middlewareallauth/account/middleware.py:34252 ms20.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:55252 ms20.5%
BaseHandler._get_responsedjango/core/handlers/base.py:198251 ms20.4%
View.as_view.<locals>.viewdjango/views/generic/base.py:106251 ms20.4%
_multi_decorate.<locals>._wrapperdjango/utils/decorators.py:48251 ms20.4%
user_passes_test.<locals>.decorator.<locals>._view_wrapperdjango/contrib/auth/decorators.py:59251 ms20.4%
_multi_decorate.<locals>._wrapperdjango/utils/decorators.py:48251 ms20.4%
rate_limit.<locals>.decorator.<locals>.wrapallauth/decorators.py:12251 ms20.4%
_multi_decorate.<locals>._wrapperdjango/utils/decorators.py:48251 ms20.4%
sensitive_post_parameters.<locals>.decorator.<locals>.sensitive_post_parameters_wrapperdjango/views/decorators/debug.py:143251 ms20.4%
PasswordChangeView.dispatchallauth/account/views.py:503251 ms20.4%
View.dispatchdjango/views/generic/base.py:145251 ms20.4%
AjaxCapableProcessFormViewMixin.postallauth/account/mixins.py:81250 ms20.3%
BaseForm.is_validdjango/forms/forms.py:206250 ms20.3%
BaseForm.errorsdjango/forms/forms.py:201250 ms20.3%
BaseForm.full_cleandjango/forms/forms.py:337250 ms20.3%
BaseForm._clean_fieldsdjango/forms/forms.py:347250 ms20.3%
ChangePasswordForm.clean_oldpasswordallauth/account/forms.py:601250 ms20.3%
AbstractBaseUser.check_passworddjango/contrib/auth/base_user.py:109250 ms20.3%
check_passworddjango/contrib/auth/hashers.py:83250 ms20.3%
verify_passworddjango/contrib/auth/hashers.py:63250 ms20.3%
PBKDF2PasswordHasher.verifydjango/contrib/auth/hashers.py:351250 ms20.3%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:335250 ms20.3%
pbkdf2django/utils/crypto.py:77250 ms20.3%
1 smaller frames hidden
1 smaller frames hidden
TestAccountSettings.test_change_passwordft/tests.py:214 self.assertTrue(self.user.check_password("staple battery horse"))234 ms19.1%
AbstractBaseUser.check_passworddjango/contrib/auth/base_user.py:109234 ms19.1%
check_passworddjango/contrib/auth/hashers.py:83234 ms19.1%
verify_passworddjango/contrib/auth/hashers.py:63234 ms19.1%
PBKDF2PasswordHasher.verifydjango/contrib/auth/hashers.py:351234 ms19.1%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:335234 ms19.1%
pbkdf2django/utils/crypto.py:77234 ms19.1%
TestAccountSettings.test_change_passwordft/tests.py:197 response = self.client.get(reverse("account_change_password"))11 ms0.9%
Client.getdjango/test/client.py:112411 ms0.9%
RequestFactory.getdjango/test/client.py:47511 ms0.9%
RequestFactory.genericdjango/test/client.py:67111 ms0.9%
Client.requestdjango/test/client.py:108211 ms0.9%
ClientHandler.__call__django/test/client.py:17310 ms0.8%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6210 ms0.8%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10410 ms0.8%
WhiteNoise.add_fileswhitenoise/base.py:10810 ms0.8%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1209 ms0.8%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:1319 ms0.8%
WhiteNoise.get_static_filewhitenoise/base.py:2087 ms0.6%
2 smaller frames hidden
1 smaller frames hidden
1 smaller frames hidden
TestAccountSettings.setUpft/tests.py:180 self.client.force_login(self.user)9 ms0.8%
ClientMixin.force_logindjango/test/client.py:8559 ms0.8%
2 smaller frames hidden
Estimated from 1,201 samples; phase durations are exact. Frames from pytest and pluggy are hidden .

Hot lines in your code

ft/tests.py:204
response = self.client.post(
TestAccountSettings.test_change_password · Password hashing
479 ms
ft/tests.py:199
response = self.client.post(
TestAccountSettings.test_change_password · Password hashing
252 ms
ft/tests.py:214
self.assertTrue(self.user.check_password("staple battery horse"))
TestAccountSettings.test_change_password · Password hashing
234 ms
ft/tests.py:176
cls.user = User.objects.create_user("anze", email="[email protected]", password="correct horse battery")
TestAccountSettings.setUpTestData · Password hashing
223 ms
ft/tests.py:197
response = self.client.get(reverse("account_change_password"))
TestAccountSettings.test_change_password · Libraries
11 ms
ft/tests.py:180
self.client.force_login(self.user)
TestAccountSettings.setUp · Database
9 ms
ft/tests.py:213
self.user.refresh_from_db()
TestAccountSettings.test_change_password · Database
1 ms
ft/tests.py:177
EmailAddress.objects.create(user=cls.user, email="[email protected]", primary=True, verified=True)
TestAccountSettings.setUpTestData · Database
0.97 ms

Fixtures

Exact setup time
_unittest_setUpClass_fixture_TestAccountSettings class 239 ms
_django_setup_unittest class 0.37 ms
_dj_autoclear_mailbox function 0.05 ms
_django_db_marker function 0.04 ms
_template_string_if_invalid_marker function 0.04 ms
_live_server_helper function 0.03 ms
_django_set_urlconf function 0.03 ms
_django_clear_site_cache function 0.02 ms
monkeypatch function 0.02 ms

Database

39 queries · 14 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:199
977 ms
setup setUpClass
django/test/testcases.py:1439
240 ms
call setUp
ft/tests.py:180
9 ms
call _post_teardown
django/test/testcases.py:1240
1 ms

Reliability

12 results · 0 CI failures · 0 local failures

This test hasn't failed recently.

History

Latest 12 results, oldest first in the strip
When Environment Outcome Duration Commit
16 hours ago CI github-actions:test passed 1.23 s e141198 main Profile
1 week, 5 days ago CI github-actions:test passed 675 ms 46ec2aa main Profile
2 weeks, 1 day ago CI github-actions:test passed 1.12 s afde85b main Profile
2 weeks, 1 day ago CI github-actions:test passed 866 ms fe29f9d main Profile
2 weeks, 1 day ago CI github-actions:test passed 1.07 s 044719a main Profile
2 weeks, 2 days ago CI github-actions:test passed 744 ms b3fedae main Profile
2 weeks, 4 days ago CI github-actions:test passed 1.07 s 43c4eda main Profile
2 weeks, 6 days ago CI github-actions:test passed 1.09 s 9caa567 main Profile
2 weeks, 6 days ago CI github-actions:test passed 1.06 s ec75501 main Profile
2 weeks, 6 days ago CI github-actions:test passed 1.32 s d2c12e5 main Profile
3 weeks ago CI github-actions:test passed 721 ms 0b902f6 main Profile
3 weeks ago CI github-actions:test passed 1.46 s 78a4357 main Profile