flakytest.dev anze3db flakytest
Tests / apps/orgs/tests.py

SignupTest::test_signing_up_creates_an_organization

First seen 3 weeks, 6 days ago in 78a4357
CI github-actions:test 15 runs
Average
314 ms
median 326 ms
max 425 ms
Phases
Setup 0.60 ms Call 313 ms Teardown 0.91 ms
Categories
Password hashing 217 ms Database 22 ms App code 0.16 ms Other (Libraries, Templates, Imports, Unsampled, ...) 75 ms

43 database queries per run

Needs 881 KB of memory (max 1 MB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, 10 hours ago · open run
Show pytest frames
call247 ms99.6%
SignupTest.test_signing_up_creates_an_organizationapps/orgs/tests.py:28 response = self.client.post(228 ms91.8%
Client.postdjango/test/client.py:1153228 ms91.8%
RequestFactory.postdjango/test/client.py:499228 ms91.8%
RequestFactory.genericdjango/test/client.py:671228 ms91.8%
Client.requestdjango/test/client.py:1082228 ms91.8%
ClientHandler.__call__django/test/client.py:186215 ms86.8%
BaseHandler.get_responsedjango/core/handlers/base.py:141215 ms86.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:55215 ms86.8%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:130215 ms86.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:55215 ms86.8%
MiddlewareMixin.__call__django/utils/deprecation.py:309215 ms86.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:55215 ms86.8%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:123215 ms86.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:55215 ms86.8%
MiddlewareMixin.__call__django/utils/deprecation.py:309215 ms86.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:55215 ms86.8%
MiddlewareMixin.__call__django/utils/deprecation.py:309215 ms86.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:55215 ms86.8%
MiddlewareMixin.__call__django/utils/deprecation.py:309215 ms86.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:55215 ms86.8%
MiddlewareMixin.__call__django/utils/deprecation.py:309215 ms86.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:55215 ms86.8%
MiddlewareMixin.__call__django/utils/deprecation.py:309215 ms86.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:55215 ms86.8%
MiddlewareMixin.__call__django/utils/deprecation.py:309215 ms86.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:55215 ms86.8%
AccountMiddleware.<locals>.middlewareallauth/account/middleware.py:34215 ms86.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:55215 ms86.8%
BaseHandler._get_responsedjango/core/handlers/base.py:198215 ms86.8%
View.as_view.<locals>.viewdjango/views/generic/base.py:106214 ms86.3%
_multi_decorate.<locals>._wrapperdjango/utils/decorators.py:48214 ms86.3%
rate_limit.<locals>.decorator.<locals>.wrapallauth/decorators.py:12214 ms86.3%
_multi_decorate.<locals>._wrapperdjango/utils/decorators.py:48214 ms86.3%
_multi_decorate.<locals>._wrapperdjango/utils/decorators.py:48214 ms86.3%
sensitive_post_parameters.<locals>.decorator.<locals>.sensitive_post_parameters_wrapperdjango/views/decorators/debug.py:143214 ms86.3%
_multi_decorate.<locals>._wrapperdjango/utils/decorators.py:48214 ms86.3%
never_cache.<locals>._view_wrapperdjango/views/decorators/cache.py:80214 ms86.3%
SignupView.dispatchallauth/account/views.py:162214 ms86.3%
_multi_decorate.<locals>._wrapperdjango/utils/decorators.py:48214 ms86.3%
_multi_decorate.<locals>._wrapperdjango/utils/decorators.py:48214 ms86.3%
never_cache.<locals>._view_wrapperdjango/views/decorators/cache.py:80214 ms86.3%
RedirectAuthenticatedUserMixin.dispatchallauth/account/mixins.py:53214 ms86.3%
CloseableSignupMixin.dispatchallauth/account/mixins.py:118214 ms86.3%
View.dispatchdjango/views/generic/base.py:145214 ms86.3%
AjaxCapableProcessFormViewMixin.postallauth/account/mixins.py:82190 ms76.7%
SignupView.form_validallauth/account/views.py:168183 ms73.9%
SignupForm.try_saveallauth/account/forms.py:497183 ms73.9%
BaseSignupForm.try_saveallauth/account/forms.py:427183 ms73.9%
BaseSignupForm.saveallauth/account/forms.py:437181 ms73.0%
DefaultAccountAdapter.save_userallauth/account/adapter.py:347179 ms72.1%
AbstractBaseUser.set_passworddjango/contrib/auth/base_user.py:94179 ms72.1%
make_passworddjango/contrib/auth/hashers.py:119179 ms72.1%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:335179 ms72.1%
pbkdf2django/utils/crypto.py:77179 ms72.1%
2 smaller frames hidden
BaseSignupForm.saveallauth/account/forms.py:4402 ms0.9%
SignupView.form_validallauth/account/views.py:1737 ms2.8%
complete_signupallauth/account/internal/flows/signup.py:1145 ms1.8%
perform_loginallauth/account/internal/flows/login.py:935 ms1.8%
resume_loginallauth/account/internal/flows/login.py:1055 ms1.8%
DefaultAccountAdapter.loginallauth/account/adapter.py:5622 ms0.9%
2 smaller frames hidden
complete_signupallauth/account/internal/flows/signup.py:1022 ms0.9%
Signal.senddjango/dispatch/dispatcher.py:2092 ms0.9%
OrgsConfig.ready.<locals>.<lambda>apps/orgs/apps.py:132 ms0.9%
AjaxCapableProcessFormViewMixin.postallauth/account/mixins.py:8123 ms9.2%
BaseForm.is_validdjango/forms/forms.py:20623 ms9.2%
BaseForm.errorsdjango/forms/forms.py:20123 ms9.2%
BaseForm.full_cleandjango/forms/forms.py:33722 ms8.7%
BaseForm._clean_fieldsdjango/forms/forms.py:34518 ms7.3%
Field._clean_bound_fielddjango/forms/fields.py:27218 ms7.3%
EmailField.cleanallauth/account/fields.py:2618 ms7.3%
Field.cleandjango/forms/fields.py:20918 ms7.3%
Field.run_validatorsdjango/forms/fields.py:19418 ms7.3%
EmailValidator.__call__django/core/validators.py:25518 ms7.3%
EmailValidator.validate_domain_partdjango/core/validators.py:26118 ms7.3%
new_method_proxy.<locals>.innerdjango/utils/functional.py:25118 ms7.3%
SimpleLazyObject._setupdjango/utils/functional.py:40418 ms7.3%
_lazy_re_compile.<locals>._compiledjango/utils/regex_helper.py:34918 ms7.3%
compile<stdlib>/re/__init__.py:29118 ms7.3%
_compile<stdlib>/re/__init__.py:35218 ms7.3%
compile<stdlib>/re/_compiler.py:76618 ms7.3%
_code<stdlib>/re/_compiler.py:59918 ms7.3%
_compile<stdlib>/re/_compiler.py:12410 ms4.1%
_compile<stdlib>/re/_compiler.py:1167 ms2.8%
_compile<stdlib>/re/_compiler.py:887 ms2.8%
_optimize_charset<stdlib>/re/_compiler.py:2733 ms1.4%
_optimize_charset<stdlib>/re/_compiler.py:2722 ms0.9%
1 smaller frames hidden
_compile<stdlib>/re/_compiler.py:883 ms1.4%
_optimize_charset<stdlib>/re/_compiler.py:2722 ms0.9%
1 smaller frames hidden
_compile<stdlib>/re/_compiler.py:885 ms1.8%
_optimize_charset<stdlib>/re/_compiler.py:2722 ms0.9%
2 smaller frames hidden
_compile<stdlib>/re/_compiler.py:1813 ms1.4%
_compile<stdlib>/re/_compiler.py:1163 ms1.4%
_compile<stdlib>/re/_compiler.py:883 ms1.4%
_optimize_charset<stdlib>/re/_compiler.py:2742 ms0.9%
1 smaller frames hidden
BaseForm._clean_fieldsdjango/forms/forms.py:3472 ms0.9%
BaseSignupForm.clean_emailallauth/account/forms.py:3692 ms0.9%
BaseSignupForm.validate_unique_emailallauth/account/forms.py:3772 ms0.9%
email_already_existsallauth/account/internal/flows/manage_email.py:2152 ms0.9%
assess_unique_emailallauth/account/internal/flows/manage_email.py:1522 ms0.9%
1 smaller frames hidden
1 smaller frames hidden
1 smaller frames hidden
1 smaller frames hidden
ClientHandler.__call__django/test/client.py:17313 ms5.0%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6213 ms5.0%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10413 ms5.0%
WhiteNoise.add_fileswhitenoise/base.py:10813 ms5.0%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12010 ms4.1%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:13110 ms4.1%
WhiteNoise.get_static_filewhitenoise/base.py:20810 ms4.1%
StaticFile.__init__whitenoise/responders.py:775 ms1.8%
StaticFile.get_alternativeswhitenoise/responders.py:2003 ms1.4%
1 smaller frames hidden
StaticFile.__init__whitenoise/responders.py:722 ms0.9%
StaticFile.get_file_statswhitenoise/responders.py:1612 ms0.9%
__init____init__:-12 ms0.9%
2 smaller frames hidden
WhiteNoise.update_files_dictionarywhitenoise/base.py:1152 ms0.9%
scantreewhitenoise/base.py:2622 ms0.9%
scantreewhitenoise/base.py:2622 ms0.9%
SignupTest.test_signing_up_creates_an_organizationapps/orgs/tests.py:38 self.assertRedirects(response, reverse("project_create", args=["ada"]))13 ms5.0%
SimpleTestCase.assertRedirectsdjango/test/testcases.py:50113 ms5.0%
Client.getdjango/test/client.py:112413 ms5.0%
RequestFactory.getdjango/test/client.py:47513 ms5.0%
RequestFactory.genericdjango/test/client.py:67113 ms5.0%
Client.requestdjango/test/client.py:108213 ms5.0%
ClientHandler.__call__django/test/client.py:18613 ms5.0%
BaseHandler.get_responsedjango/core/handlers/base.py:14113 ms5.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5513 ms5.0%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:13013 ms5.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5513 ms5.0%
MiddlewareMixin.__call__django/utils/deprecation.py:30913 ms5.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5513 ms5.0%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:12313 ms5.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5513 ms5.0%
MiddlewareMixin.__call__django/utils/deprecation.py:30911 ms4.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5511 ms4.6%
MiddlewareMixin.__call__django/utils/deprecation.py:30911 ms4.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5511 ms4.6%
MiddlewareMixin.__call__django/utils/deprecation.py:30911 ms4.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5511 ms4.6%
MiddlewareMixin.__call__django/utils/deprecation.py:30911 ms4.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5511 ms4.6%
MiddlewareMixin.__call__django/utils/deprecation.py:30911 ms4.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5511 ms4.6%
MiddlewareMixin.__call__django/utils/deprecation.py:30911 ms4.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5511 ms4.6%
AccountMiddleware.<locals>.middlewareallauth/account/middleware.py:3411 ms4.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5511 ms4.6%
BaseHandler._get_responsedjango/core/handlers/base.py:19811 ms4.6%
user_passes_test.<locals>.decorator.<locals>._view_wrapperdjango/contrib/auth/decorators.py:5911 ms4.6%
project_createapps/orgs/views.py:137 return render(7 ms2.8%
renderdjango/shortcuts.py:257 ms2.8%
render_to_stringdjango/template/loader.py:627 ms2.8%
Template.renderdjango/template/backends/django.py:1077 ms2.8%
Template.renderdjango/template/base.py:1747 ms2.8%
instrumented_test_renderdjango/test/utils.py:1147 ms2.8%
NodeList.renderdjango/template/base.py:10917 ms2.8%
Node.render_annotateddjango/template/base.py:10527 ms2.8%
ExtendsNode.renderdjango/template/loader_tags.py:1607 ms2.8%
instrumented_test_renderdjango/test/utils.py:1146 ms2.3%
NodeList.renderdjango/template/base.py:10916 ms2.3%
Node.render_annotateddjango/template/base.py:10526 ms2.3%
ExtendsNode.renderdjango/template/loader_tags.py:1606 ms2.3%
instrumented_test_renderdjango/test/utils.py:1146 ms2.3%
NodeList.renderdjango/template/base.py:10916 ms2.3%
Node.render_annotateddjango/template/base.py:10526 ms2.3%
BlockNode.renderdjango/template/loader_tags.py:665 ms1.8%
NodeList.renderdjango/template/base.py:10915 ms1.8%
Node.render_annotateddjango/template/base.py:10525 ms1.8%
IfNode.renderdjango/template/defaulttags.py:3332 ms0.9%
NodeList.renderdjango/template/base.py:10912 ms0.9%
Node.render_annotateddjango/template/base.py:10522 ms0.9%
SimpleNode.renderdjango/template/library.py:3252 ms0.9%
heroicon_miniheroicons/templatetags/heroicons.py:182 ms0.9%
_render_iconheroicons/templatetags/heroicons.py:392 ms0.9%
_render_iconheroicons/__init__.py:452 ms0.9%
_load_iconheroicons/__init__.py:182 ms0.9%
ZipFile.__init__<stdlib>/zipfile/__init__.py:15052 ms0.9%
ZipFile._RealGetContents<stdlib>/zipfile/__init__.py:16062 ms0.9%
IncludeNode.renderdjango/template/loader_tags.py:2112 ms0.9%
Template.renderdjango/template/base.py:1762 ms0.9%
instrumented_test_renderdjango/test/utils.py:1142 ms0.9%
NodeList.renderdjango/template/base.py:10912 ms0.9%
Node.render_annotateddjango/template/base.py:10522 ms0.9%
IfNode.renderdjango/template/defaulttags.py:3332 ms0.9%
NodeList.renderdjango/template/base.py:10912 ms0.9%
Node.render_annotateddjango/template/base.py:10522 ms0.9%
ForNode.renderdjango/template/defaulttags.py:2492 ms0.9%
Node.render_annotateddjango/template/base.py:10522 ms0.9%
SimpleNode.renderdjango/template/library.py:3252 ms0.9%
heroicon_miniheroicons/templatetags/heroicons.py:182 ms0.9%
_render_iconheroicons/templatetags/heroicons.py:392 ms0.9%
_render_iconheroicons/__init__.py:452 ms0.9%
_load_iconheroicons/__init__.py:182 ms0.9%
ZipFile.__init__<stdlib>/zipfile/__init__.py:15052 ms0.9%
ZipFile._RealGetContents<stdlib>/zipfile/__init__.py:16232 ms0.9%
1 smaller frames hidden
1 smaller frames hidden
4 smaller frames hidden
1 smaller frames hidden
SignupTest.test_signing_up_creates_an_organizationapps/orgs/tests.py:37 response = self.client.get(reverse("projects"))5 ms1.8%
Client.getdjango/test/client.py:11245 ms1.8%
RequestFactory.getdjango/test/client.py:4755 ms1.8%
RequestFactory.genericdjango/test/client.py:6715 ms1.8%
Client.requestdjango/test/client.py:10825 ms1.8%
ClientHandler.__call__django/test/client.py:1865 ms1.8%
BaseHandler.get_responsedjango/core/handlers/base.py:1415 ms1.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:555 ms1.8%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:1305 ms1.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:555 ms1.8%
MiddlewareMixin.__call__django/utils/deprecation.py:3095 ms1.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:555 ms1.8%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:1235 ms1.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:555 ms1.8%
MiddlewareMixin.__call__django/utils/deprecation.py:3095 ms1.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:555 ms1.8%
MiddlewareMixin.__call__django/utils/deprecation.py:3095 ms1.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:555 ms1.8%
MiddlewareMixin.__call__django/utils/deprecation.py:3095 ms1.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:555 ms1.8%
MiddlewareMixin.__call__django/utils/deprecation.py:3095 ms1.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:555 ms1.8%
MiddlewareMixin.__call__django/utils/deprecation.py:3095 ms1.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:555 ms1.8%
MiddlewareMixin.__call__django/utils/deprecation.py:3095 ms1.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:555 ms1.8%
AccountMiddleware.<locals>.middlewareallauth/account/middleware.py:345 ms1.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:555 ms1.8%
BaseHandler._get_responsedjango/core/handlers/base.py:1985 ms1.8%
user_passes_test.<locals>.decorator.<locals>._view_wrapperdjango/contrib/auth/decorators.py:562 ms0.9%
login_required.<locals>.<lambda>django/contrib/auth/decorators.py:792 ms0.9%
new_method_proxy.<locals>.innerdjango/utils/functional.py:2512 ms0.9%
SimpleLazyObject._setupdjango/utils/functional.py:4042 ms0.9%
AuthenticationMiddleware.process_request.<locals>.<lambda>django/contrib/auth/middleware.py:402 ms0.9%
get_userdjango/contrib/auth/middleware.py:202 ms0.9%
user_passes_test.<locals>.decorator.<locals>._view_wrapperdjango/contrib/auth/decorators.py:592 ms0.9%
2 smaller frames hidden
Estimated from 217 samples; phase durations are exact. Frames from pytest and pluggy are hidden .

Hot lines in your code

apps/orgs/tests.py:28
response = self.client.post(
SignupTest.test_signing_up_creates_an_organization · Password hashing
225 ms
apps/orgs/views.py:137
return render(
project_create · Templates
7 ms
apps/orgs/models.py:126
membership = Membership.objects.filter(user=user).select_related("organization").order_by("id").first()
ensure_organization · Database
2 ms
apps/orgs/tests.py:37
response = self.client.get(reverse("projects"))
SignupTest.test_signing_up_creates_an_organization · Database
2 ms
apps/orgs/models.py:133
Membership.objects.create(organization=organization, user=user, role=Membership.Role.OWNER)
ensure_organization · Database
1 ms
apps/orgs/tests.py:34
self.assertEqual((membership.organization.slug, membership.role), ("ada", Membership.Role.OWNER))
SignupTest.test_signing_up_creates_an_organization · Database
1 ms
apps/orgs/views.py:74
if not projects.exists():
home · Database
1 ms
apps/orgs/models.py:62
return user.is_authenticated and self.membership_set.filter(user=user).exists()
Organization.is_member · Database
1 ms
apps/orgs/views.py:126
first = not Project.objects.filter(organization__membership__user=request.user).exists()
project_create · Database
1 ms
apps/orgs/models.py:65
return user.is_authenticated and self.membership_set.filter(user=user, role=Membership.Role.OWNER).exists()
Organization.is_owner · Database
1 ms

Fixtures

Exact setup time
_dj_autoclear_mailbox function 0.06 ms
_django_db_marker function 0.03 ms
_template_string_if_invalid_marker function 0.03 ms
_django_set_urlconf function 0.03 ms
_django_clear_site_cache function 0.02 ms
_live_server_helper function 0.02 ms
monkeypatch function 0.01 ms

Database

43 queries · 13 ms

Repeated queries are usually N+1 lookups: fetch them once with select_related / prefetch_related (or selectinload).

3×
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…

Biggest pieces of work

call test body
apps/orgs/tests.py:28
246 ms
call _post_teardown
django/test/testcases.py:1240
1 ms

Reliability

15 results · 0 CI failures · 0 local failures

This test hasn't failed recently.

History

Latest 15 results, oldest first in the strip
When Environment Outcome Duration Commit
10 hours ago CI github-actions:test passed 248 ms cb18ed3 main Profile
3 days, 20 hours ago CI github-actions:test passed 350 ms 9bd5864 main Profile
5 days, 20 hours ago CI github-actions:test passed 195 ms 19dac9b main Profile
6 days, 20 hours ago CI github-actions:test passed 344 ms e141198 main Profile
2 weeks, 4 days ago CI github-actions:test passed 199 ms 46ec2aa main Profile
3 weeks ago CI github-actions:test passed 332 ms afde85b main Profile
3 weeks ago CI github-actions:test passed 276 ms fe29f9d main Profile
3 weeks ago CI github-actions:test passed 342 ms 044719a main Profile
3 weeks, 1 day ago CI github-actions:test passed 207 ms b3fedae main Profile
3 weeks, 4 days ago CI github-actions:test passed 326 ms 43c4eda main Profile
3 weeks, 5 days ago CI github-actions:test passed 323 ms 9caa567 main Profile
3 weeks, 5 days ago CI github-actions:test passed 321 ms ec75501 main Profile
3 weeks, 6 days ago CI github-actions:test passed 425 ms d2c12e5 main Profile
3 weeks, 6 days ago CI github-actions:test passed 403 ms 0b902f6 main Profile
3 weeks, 6 days ago CI github-actions:test passed 423 ms 78a4357 main Profile