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

SignupTest::test_signing_up_creates_an_organization

First seen 3 weeks ago in 78a4357
CI github-actions:test 12 runs
Average
327 ms
median 329 ms
max 425 ms
Phases
Setup 0.64 ms Call 325 ms Teardown 0.85 ms
Categories
Password hashing 224 ms Database 23 ms App code 0.20 ms Other (Libraries, Templates, Imports, pytest, ...) 80 ms

43 database queries per run

Needs 794 KB of memory (max 1 MB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, 16 hours ago · open run
Show pytest frames
setup0.73 ms0.2%
call343 ms99.6%
SignupTest.test_signing_up_creates_an_organizationapps/orgs/tests.py:28 response = self.client.post(317 ms92.1%
Client.postdjango/test/client.py:1153317 ms92.1%
RequestFactory.postdjango/test/client.py:499317 ms92.1%
RequestFactory.genericdjango/test/client.py:671317 ms92.1%
Client.requestdjango/test/client.py:1082317 ms92.1%
ClientHandler.__call__django/test/client.py:186302 ms87.8%
BaseHandler.get_responsedjango/core/handlers/base.py:141302 ms87.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:55302 ms87.8%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:130302 ms87.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:55302 ms87.8%
MiddlewareMixin.__call__django/utils/deprecation.py:309302 ms87.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:55302 ms87.8%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:123302 ms87.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:55302 ms87.8%
MiddlewareMixin.__call__django/utils/deprecation.py:309301 ms87.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:55301 ms87.5%
MiddlewareMixin.__call__django/utils/deprecation.py:309301 ms87.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:55301 ms87.5%
MiddlewareMixin.__call__django/utils/deprecation.py:309301 ms87.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:55301 ms87.5%
MiddlewareMixin.__call__django/utils/deprecation.py:309301 ms87.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:55301 ms87.5%
MiddlewareMixin.__call__django/utils/deprecation.py:309301 ms87.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:55301 ms87.5%
MiddlewareMixin.__call__django/utils/deprecation.py:309301 ms87.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:55301 ms87.5%
AccountMiddleware.<locals>.middlewareallauth/account/middleware.py:34301 ms87.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:55301 ms87.5%
BaseHandler._get_responsedjango/core/handlers/base.py:198301 ms87.5%
View.as_view.<locals>.viewdjango/views/generic/base.py:106301 ms87.5%
_multi_decorate.<locals>._wrapperdjango/utils/decorators.py:48301 ms87.5%
rate_limit.<locals>.decorator.<locals>.wrapallauth/decorators.py:12301 ms87.5%
_multi_decorate.<locals>._wrapperdjango/utils/decorators.py:48301 ms87.5%
_multi_decorate.<locals>._wrapperdjango/utils/decorators.py:48301 ms87.5%
sensitive_post_parameters.<locals>.decorator.<locals>.sensitive_post_parameters_wrapperdjango/views/decorators/debug.py:143301 ms87.5%
_multi_decorate.<locals>._wrapperdjango/utils/decorators.py:48301 ms87.5%
never_cache.<locals>._view_wrapperdjango/views/decorators/cache.py:80301 ms87.5%
SignupView.dispatchallauth/account/views.py:162301 ms87.5%
_multi_decorate.<locals>._wrapperdjango/utils/decorators.py:48301 ms87.5%
_multi_decorate.<locals>._wrapperdjango/utils/decorators.py:48301 ms87.5%
never_cache.<locals>._view_wrapperdjango/views/decorators/cache.py:80301 ms87.5%
RedirectAuthenticatedUserMixin.dispatchallauth/account/mixins.py:53301 ms87.5%
CloseableSignupMixin.dispatchallauth/account/mixins.py:118301 ms87.5%
View.dispatchdjango/views/generic/base.py:145301 ms87.5%
AjaxCapableProcessFormViewMixin.postallauth/account/mixins.py:82267 ms77.6%
SignupView.form_validallauth/account/views.py:168262 ms76.0%
SignupForm.try_saveallauth/account/forms.py:497262 ms76.0%
BaseSignupForm.try_saveallauth/account/forms.py:427262 ms76.0%
BaseSignupForm.saveallauth/account/forms.py:437258 ms75.0%
DefaultAccountAdapter.save_userallauth/account/adapter.py:347255 ms74.0%
AbstractBaseUser.set_passworddjango/contrib/auth/base_user.py:94255 ms74.0%
make_passworddjango/contrib/auth/hashers.py:119255 ms74.0%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:335255 ms74.0%
pbkdf2django/utils/crypto.py:77255 ms74.0%
DefaultAccountAdapter.save_userallauth/account/adapter.py:3512 ms0.7%
DefaultAccountAdapter.populate_usernameallauth/account/adapter.py:3132 ms0.7%
DefaultAccountAdapter.generate_unique_usernameallauth/account/adapter.py:3192 ms0.7%
1 smaller frames hidden
BaseSignupForm.saveallauth/account/forms.py:4403 ms1.0%
setup_user_emailallauth/account/utils.py:2092 ms0.7%
1 smaller frames hidden
SignupView.form_validallauth/account/views.py:1736 ms1.6%
complete_signupallauth/account/internal/flows/signup.py:1143 ms1.0%
perform_loginallauth/account/internal/flows/login.py:933 ms1.0%
resume_loginallauth/account/internal/flows/login.py:1052 ms0.7%
1 smaller frames hidden
complete_signupallauth/account/internal/flows/signup.py:1022 ms0.7%
Signal.senddjango/dispatch/dispatcher.py:2092 ms0.7%
OrgsConfig.ready.<locals>.<lambda>apps/orgs/apps.py:132 ms0.7%
AjaxCapableProcessFormViewMixin.postallauth/account/mixins.py:8134 ms9.8%
BaseForm.is_validdjango/forms/forms.py:20634 ms9.8%
BaseForm.errorsdjango/forms/forms.py:20134 ms9.8%
BaseForm.full_cleandjango/forms/forms.py:33734 ms9.8%
BaseForm._clean_fieldsdjango/forms/forms.py:34528 ms8.2%
Field._clean_bound_fielddjango/forms/fields.py:27228 ms8.2%
EmailField.cleanallauth/account/fields.py:2628 ms8.2%
Field.cleandjango/forms/fields.py:20928 ms8.2%
Field.run_validatorsdjango/forms/fields.py:19428 ms8.2%
EmailValidator.__call__django/core/validators.py:25527 ms7.9%
EmailValidator.validate_domain_partdjango/core/validators.py:26127 ms7.9%
new_method_proxy.<locals>.innerdjango/utils/functional.py:25127 ms7.9%
SimpleLazyObject._setupdjango/utils/functional.py:40427 ms7.9%
_lazy_re_compile.<locals>._compiledjango/utils/regex_helper.py:34927 ms7.9%
compile<stdlib>/re/__init__.py:29127 ms7.9%
_compile<stdlib>/re/__init__.py:35227 ms7.9%
compile<stdlib>/re/_compiler.py:76627 ms7.9%
_code<stdlib>/re/_compiler.py:59927 ms7.9%
_compile<stdlib>/re/_compiler.py:12416 ms4.6%
_compile<stdlib>/re/_compiler.py:11611 ms3.3%
_compile<stdlib>/re/_compiler.py:8811 ms3.3%
_optimize_charset<stdlib>/re/_compiler.py:2747 ms2.0%
_optimize_charset<stdlib>/re/_compiler.py:2722 ms0.7%
_optimize_charset<stdlib>/re/_compiler.py:2732 ms0.7%
_compile<stdlib>/re/_compiler.py:885 ms1.3%
_optimize_charset<stdlib>/re/_compiler.py:2723 ms1.0%
1 smaller frames hidden
_compile<stdlib>/re/_compiler.py:886 ms1.6%
_optimize_charset<stdlib>/re/_compiler.py:2723 ms1.0%
2 smaller frames hidden
_compile<stdlib>/re/_compiler.py:1816 ms1.6%
_compile<stdlib>/re/_compiler.py:1166 ms1.6%
_compile<stdlib>/re/_compiler.py:886 ms1.6%
_optimize_charset<stdlib>/re/_compiler.py:2723 ms1.0%
_optimize_charset<stdlib>/re/_compiler.py:2732 ms0.7%
1 smaller frames hidden
BaseForm._clean_fieldsdjango/forms/forms.py:3423 ms1.0%
BaseForm._bound_itemsdjango/forms/forms.py:1733 ms1.0%
BaseForm.__getitem__django/forms/forms.py:1943 ms1.0%
Field.get_bound_fielddjango/forms/fields.py:2603 ms1.0%
__init____init__:-13 ms1.0%
BoundField.__init__django/forms/boundfield.py:273 ms1.0%
lazy.<locals>.__wrapper__django/utils/functional.py:1873 ms1.0%
_password_validators_help_text_htmldjango/contrib/auth/password_validation.py:893 ms1.0%
password_validators_help_textsdjango/contrib/auth/password_validation.py:783 ms1.0%
get_default_password_validatorsdjango/contrib/auth/password_validation.py:223 ms1.0%
get_password_validatorsdjango/contrib/auth/password_validation.py:363 ms1.0%
CommonPasswordValidator.__init__django/contrib/auth/password_validation.py:2453 ms1.0%
BaseForm._clean_fieldsdjango/forms/forms.py:3472 ms0.7%
BaseSignupForm.clean_emailallauth/account/forms.py:3692 ms0.7%
BaseSignupForm.validate_unique_emailallauth/account/forms.py:3772 ms0.7%
email_already_existsallauth/account/internal/flows/manage_email.py:2152 ms0.7%
assess_unique_emailallauth/account/internal/flows/manage_email.py:1522 ms0.7%
1 smaller frames hidden
ClientHandler.__call__django/test/client.py:17315 ms4.3%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6214 ms3.9%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10414 ms3.9%
WhiteNoise.add_fileswhitenoise/base.py:10814 ms3.9%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12011 ms3.3%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:13111 ms3.3%
WhiteNoise.get_static_filewhitenoise/base.py:2088 ms2.3%
StaticFile.__init__whitenoise/responders.py:752 ms0.7%
Headers.__getitem__<stdlib>/wsgiref/headers.py:832 ms0.7%
Headers.get<stdlib>/wsgiref/headers.py:1062 ms0.7%
StaticFile.__init__whitenoise/responders.py:732 ms0.7%
StaticFile.get_headerswhitenoise/responders.py:1762 ms0.7%
formatdate<stdlib>/email/utils.py:2662 ms0.7%
1 smaller frames hidden
WhiteNoise.get_static_filewhitenoise/base.py:2032 ms0.7%
WhiteNoise.add_cache_headerswhitenoise/base.py:2242 ms0.7%
WhiteNoiseMiddleware.immutable_file_testwhitenoise/middleware.py:1762 ms0.7%
WhiteNoiseMiddleware.get_static_urlwhitenoise/middleware.py:1972 ms0.7%
URLMixin.urldebug_toolbar/panels/staticfiles.py:202 ms0.7%
1 smaller frames hidden
WhiteNoise.update_files_dictionarywhitenoise/base.py:1152 ms0.7%
scantreewhitenoise/base.py:2622 ms0.7%
scantreewhitenoise/base.py:2622 ms0.7%
1 smaller frames hidden
SignupTest.test_signing_up_creates_an_organizationapps/orgs/tests.py:38 self.assertRedirects(response, reverse("project_create", args=["ada"]))20 ms5.9%
SimpleTestCase.assertRedirectsdjango/test/testcases.py:50120 ms5.9%
Client.getdjango/test/client.py:112420 ms5.9%
RequestFactory.getdjango/test/client.py:47520 ms5.9%
RequestFactory.genericdjango/test/client.py:67120 ms5.9%
Client.requestdjango/test/client.py:108220 ms5.9%
ClientHandler.__call__django/test/client.py:18620 ms5.9%
BaseHandler.get_responsedjango/core/handlers/base.py:14120 ms5.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5520 ms5.9%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:13020 ms5.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5520 ms5.9%
MiddlewareMixin.__call__django/utils/deprecation.py:30920 ms5.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5520 ms5.9%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:12320 ms5.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5520 ms5.9%
MiddlewareMixin.__call__django/utils/deprecation.py:30919 ms5.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5519 ms5.6%
MiddlewareMixin.__call__django/utils/deprecation.py:30919 ms5.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5519 ms5.6%
MiddlewareMixin.__call__django/utils/deprecation.py:30919 ms5.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5519 ms5.6%
MiddlewareMixin.__call__django/utils/deprecation.py:30919 ms5.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5519 ms5.6%
MiddlewareMixin.__call__django/utils/deprecation.py:30919 ms5.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5519 ms5.6%
MiddlewareMixin.__call__django/utils/deprecation.py:30919 ms5.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5519 ms5.6%
AccountMiddleware.<locals>.middlewareallauth/account/middleware.py:3419 ms5.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5519 ms5.6%
BaseHandler._get_responsedjango/core/handlers/base.py:19819 ms5.6%
user_passes_test.<locals>.decorator.<locals>._view_wrapperdjango/contrib/auth/decorators.py:5917 ms4.9%
project_createapps/orgs/views.py:137 return render(14 ms3.9%
renderdjango/shortcuts.py:2514 ms3.9%
render_to_stringdjango/template/loader.py:6214 ms3.9%
Template.renderdjango/template/backends/django.py:10714 ms3.9%
Template.renderdjango/template/base.py:17414 ms3.9%
instrumented_test_renderdjango/test/utils.py:11414 ms3.9%
NodeList.renderdjango/template/base.py:109114 ms3.9%
Node.render_annotateddjango/template/base.py:105214 ms3.9%
ExtendsNode.renderdjango/template/loader_tags.py:16014 ms3.9%
instrumented_test_renderdjango/test/utils.py:11414 ms3.9%
NodeList.renderdjango/template/base.py:109114 ms3.9%
Node.render_annotateddjango/template/base.py:105214 ms3.9%
ExtendsNode.renderdjango/template/loader_tags.py:16014 ms3.9%
instrumented_test_renderdjango/test/utils.py:11414 ms3.9%
NodeList.renderdjango/template/base.py:109114 ms3.9%
Node.render_annotateddjango/template/base.py:105214 ms3.9%
BlockNode.renderdjango/template/loader_tags.py:6612 ms3.6%
NodeList.renderdjango/template/base.py:109112 ms3.6%
Node.render_annotateddjango/template/base.py:105212 ms3.6%
IfNode.renderdjango/template/defaulttags.py:3337 ms2.0%
NodeList.renderdjango/template/base.py:10917 ms2.0%
Node.render_annotateddjango/template/base.py:10527 ms2.0%
SimpleNode.renderdjango/template/library.py:3257 ms2.0%
heroicon_miniheroicons/templatetags/heroicons.py:187 ms2.0%
_render_iconheroicons/templatetags/heroicons.py:397 ms2.0%
_render_iconheroicons/__init__.py:457 ms2.0%
_load_iconheroicons/__init__.py:187 ms2.0%
ZipFile.__init__<stdlib>/zipfile/__init__.py:15057 ms2.0%
ZipFile._RealGetContents<stdlib>/zipfile/__init__.py:16065 ms1.3%
Codec.decode<stdlib>/encodings/cp437.py:142 ms0.7%
<GC>~2 ms0.7%
1 smaller frames hidden
2 smaller frames hidden
IncludeNode.renderdjango/template/loader_tags.py:2115 ms1.3%
Template.renderdjango/template/base.py:1765 ms1.3%
instrumented_test_renderdjango/test/utils.py:1145 ms1.3%
NodeList.renderdjango/template/base.py:10915 ms1.3%
Node.render_annotateddjango/template/base.py:10525 ms1.3%
IfNode.renderdjango/template/defaulttags.py:3335 ms1.3%
NodeList.renderdjango/template/base.py:10915 ms1.3%
Node.render_annotateddjango/template/base.py:10525 ms1.3%
ForNode.renderdjango/template/defaulttags.py:2495 ms1.3%
Node.render_annotateddjango/template/base.py:10525 ms1.3%
SimpleNode.renderdjango/template/library.py:3255 ms1.3%
heroicon_miniheroicons/templatetags/heroicons.py:185 ms1.3%
_render_iconheroicons/templatetags/heroicons.py:395 ms1.3%
_render_iconheroicons/__init__.py:455 ms1.3%
_load_iconheroicons/__init__.py:185 ms1.3%
ZipFile.__init__<stdlib>/zipfile/__init__.py:15055 ms1.3%
1 smaller frames hidden
1 smaller frames hidden
project_createapps/orgs/views.py:1412 ms0.7%
org_shellapps/orgs/views.py:33 organizations = [] if user.is_anonymous else list(Organization.objects.filter(membership__user=user))2 ms0.7%
QuerySet.__iter__django/db/models/query.py:3902 ms0.7%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms0.7%
ModelIterable.__iter__django/db/models/query.py:952 ms0.7%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16112 ms0.7%
SQLCompiler.as_sqldjango/db/models/sql/compiler.py:7672 ms0.7%
1 smaller frames hidden
user_passes_test.<locals>.decorator.<locals>._view_wrapperdjango/contrib/auth/decorators.py:562 ms0.7%
login_required.<locals>.<lambda>django/contrib/auth/decorators.py:792 ms0.7%
new_method_proxy.<locals>.innerdjango/utils/functional.py:2512 ms0.7%
SimpleLazyObject._setupdjango/utils/functional.py:4042 ms0.7%
AuthenticationMiddleware.process_request.<locals>.<lambda>django/contrib/auth/middleware.py:402 ms0.7%
get_userdjango/contrib/auth/middleware.py:202 ms0.7%
1 smaller frames hidden
SignupTest.test_signing_up_creates_an_organizationapps/orgs/tests.py:37 response = self.client.get(reverse("projects"))2 ms0.7%
Client.getdjango/test/client.py:11242 ms0.7%
RequestFactory.getdjango/test/client.py:4752 ms0.7%
RequestFactory.genericdjango/test/client.py:6712 ms0.7%
Client.requestdjango/test/client.py:10822 ms0.7%
2 smaller frames hidden
Estimated from 306 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
315 ms
apps/orgs/views.py:137
return render(
project_create · Templates
14 ms
apps/orgs/tests.py:38
self.assertRedirects(response, reverse("project_create", args=["ada"]))
SignupTest.test_signing_up_creates_an_organization · Database
3 ms
apps/orgs/views.py:33
organizations = [] if user.is_anonymous else list(Organization.objects.filter(membership__user=user))
org_shell · Database
2 ms
apps/orgs/models.py:126
membership = Membership.objects.filter(user=user).select_related("organization").order_by("id").first()
ensure_organization · Database
1 ms
apps/orgs/models.py:130
organization = Organization.objects.create(
ensure_organization · Database
1 ms
apps/orgs/tests.py:33
membership = Membership.objects.get(user__email="[email protected]")
SignupTest.test_signing_up_creates_an_organization · Database
1 ms
apps/orgs/tests.py:37
response = self.client.get(reverse("projects"))
SignupTest.test_signing_up_creates_an_organization · Libraries
1 ms
apps/orgs/views.py:74
if not projects.exists():
home · 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
_template_string_if_invalid_marker function 0.05 ms
_dj_autoclear_mailbox function 0.04 ms
_django_db_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.03 ms
monkeypatch function 0.02 ms

Database

43 queries · 16 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
340 ms
call _post_teardown
django/test/testcases.py:1240
1 ms
call pytest internals 1 ms
setup __init__
__init__:-1
0.73 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 344 ms e141198 main Profile
1 week, 5 days ago CI github-actions:test passed 199 ms 46ec2aa main Profile
2 weeks, 1 day ago CI github-actions:test passed 332 ms afde85b main Profile
2 weeks, 1 day ago CI github-actions:test passed 276 ms fe29f9d main Profile
2 weeks, 1 day ago CI github-actions:test passed 342 ms 044719a main Profile
2 weeks, 2 days ago CI github-actions:test passed 207 ms b3fedae main Profile
2 weeks, 4 days ago CI github-actions:test passed 326 ms 43c4eda main Profile
2 weeks, 6 days ago CI github-actions:test passed 323 ms 9caa567 main Profile
2 weeks, 6 days ago CI github-actions:test passed 321 ms ec75501 main Profile
2 weeks, 6 days ago CI github-actions:test passed 425 ms d2c12e5 main Profile
3 weeks ago CI github-actions:test passed 403 ms 0b902f6 main Profile
3 weeks ago CI github-actions:test passed 423 ms 78a4357 main Profile