flakytest.dev anze3db fedidevs
Tests / confs/tests.py

TestEditConference::test_owner_can_view_edit_form

First seen 1 month, 1 week ago in 0c23747
CI github-actions:test 13 runs
Average
1.32 s
median 1.07 s
max 3.04 s
Phases
Setup 2 ms Call 1.32 s Teardown 0.29 ms
Categories
Password hashing 1.21 s Database 29 ms Factories 0.15 ms Other (Libraries, Templates, Deep copies, pytest, ...) 85 ms

30 database queries per run

Needs 398 KB of memory (max 900 KB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, 2 weeks ago · open run
Show pytest frames
setup0.60 ms0.1%
call765 ms99.9%
TestEditConference.setUpconfs/tests.py:1175 self.owner = User.objects.create_user("owner", password="pw")251 ms32.8%
UserManager.create_userdjango/contrib/auth/models.py:180251 ms32.8%
UserManager._create_userdjango/contrib/auth/models.py:167250 ms32.7%
UserManager._create_user_objectdjango/contrib/auth/models.py:160250 ms32.7%
make_passworddjango/contrib/auth/hashers.py:118250 ms32.7%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333250 ms32.7%
pbkdf2django/utils/crypto.py:93250 ms32.7%
1 smaller frames hidden
TestEditConference.setUpconfs/tests.py:1177 self.staff = User.objects.create_user("staff", password="pw", is_staff=True)244 ms31.9%
UserManager.create_userdjango/contrib/auth/models.py:180244 ms31.9%
UserManager._create_userdjango/contrib/auth/models.py:167243 ms31.7%
UserManager._create_user_objectdjango/contrib/auth/models.py:160243 ms31.7%
make_passworddjango/contrib/auth/hashers.py:118243 ms31.7%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333243 ms31.7%
pbkdf2django/utils/crypto.py:93243 ms31.7%
1 smaller frames hidden
TestEditConference.setUpconfs/tests.py:1176 self.other = User.objects.create_user("other", password="pw")243 ms31.7%
UserManager.create_userdjango/contrib/auth/models.py:180243 ms31.7%
UserManager._create_userdjango/contrib/auth/models.py:167243 ms31.7%
UserManager._create_user_objectdjango/contrib/auth/models.py:159243 ms31.7%
make_passworddjango/contrib/auth/hashers.py:118242 ms31.6%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333242 ms31.6%
pbkdf2django/utils/crypto.py:93242 ms31.6%
1 smaller frames hidden
TestEditConference.test_owner_can_view_edit_formconfs/tests.py:1213 response = self.client.get(self.url)22 ms2.9%
Client.getdjango/test/client.py:113322 ms2.9%
RequestFactory.getdjango/test/client.py:47522 ms2.9%
RequestFactory.genericdjango/test/client.py:67122 ms2.9%
Client.requestdjango/test/client.py:109122 ms2.9%
ClientHandler.__call__django/test/client.py:18616 ms2.1%
BaseHandler.get_responsedjango/core/handlers/base.py:14216 ms2.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5616 ms2.1%
MiddlewareMixin.__call__django/utils/deprecation.py:38016 ms2.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5616 ms2.1%
MiddlewareMixin.__call__django/utils/deprecation.py:38016 ms2.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5616 ms2.1%
MiddlewareMixin.__call__django/utils/deprecation.py:38016 ms2.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5616 ms2.1%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:12316 ms2.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5616 ms2.1%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:14516 ms2.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5616 ms2.1%
MiddlewareMixin.__call__django/utils/deprecation.py:38016 ms2.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5616 ms2.1%
MiddlewareMixin.__call__django/utils/deprecation.py:38016 ms2.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5616 ms2.1%
MiddlewareMixin.__call__django/utils/deprecation.py:38016 ms2.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5616 ms2.1%
MiddlewareMixin.__call__django/utils/deprecation.py:38016 ms2.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5616 ms2.1%
MiddlewareMixin.__call__django/utils/deprecation.py:38016 ms2.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5616 ms2.1%
MiddlewareMixin.__call__django/utils/deprecation.py:38016 ms2.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5616 ms2.1%
MiddlewareMixin.__call__django/utils/deprecation.py:38016 ms2.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5616 ms2.1%
BaseHandler._get_responsedjango/core/handlers/base.py:19916 ms2.1%
user_passes_test.<locals>.decorator.<locals>._view_wrapperdjango/contrib/auth/decorators.py:6216 ms2.1%
edit_conferenceconfs/views.py:548 return render(16 ms2.1%
renderdjango/shortcuts.py:2715 ms1.9%
render_to_stringdjango/template/loader.py:6215 ms1.9%
Template.renderdjango/template/backends/django.py:10715 ms1.9%
Template.renderdjango/template/base.py:17515 ms1.9%
instrumented_test_renderdjango/test/utils.py:11315 ms1.9%
NodeList.renderdjango/template/base.py:110815 ms1.9%
Node.render_annotateddjango/template/base.py:106915 ms1.9%
ExtendsNode.renderdjango/template/loader_tags.py:16015 ms1.9%
instrumented_test_renderdjango/test/utils.py:11315 ms1.9%
NodeList.renderdjango/template/base.py:110815 ms1.9%
Node.render_annotateddjango/template/base.py:106915 ms1.9%
BlockNode.renderdjango/template/loader_tags.py:6613 ms1.6%
NodeList.renderdjango/template/base.py:110813 ms1.6%
Node.render_annotateddjango/template/base.py:106913 ms1.6%
VariableNode.renderdjango/template/base.py:11739 ms1.2%
render_value_in_contextdjango/template/base.py:11509 ms1.2%
RenderableFieldMixin.__str__django/forms/utils.py:799 ms1.2%
BoundField.as_widgetdjango/forms/boundfield.py:1089 ms1.2%
Widget.renderdjango/forms/widgets.py:3768 ms1.1%
Widget._renderdjango/forms/widgets.py:3818 ms1.1%
BaseRenderer.renderdjango/forms/renderers.py:298 ms1.1%
Template.renderdjango/template/backends/django.py:1078 ms1.1%
Template.renderdjango/template/base.py:1757 ms1.0%
instrumented_test_renderdjango/test/utils.py:1137 ms1.0%
NodeList.renderdjango/template/base.py:11087 ms1.0%
Node.render_annotateddjango/template/base.py:10697 ms1.0%
ForNode.renderdjango/template/defaulttags.py:2495 ms0.7%
Node.render_annotateddjango/template/base.py:10695 ms0.7%
ForNode.renderdjango/template/defaulttags.py:2495 ms0.7%
1 smaller frames hidden
1 smaller frames hidden
1 smaller frames hidden
3 smaller frames hidden
2 smaller frames hidden
1 smaller frames hidden
ClientHandler.__call__django/test/client.py:1736 ms0.8%
BaseHandler.load_middlewaredjango/core/handlers/base.py:636 ms0.8%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:1046 ms0.8%
WhiteNoise.add_fileswhitenoise/base.py:1086 ms0.8%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1154 ms0.5%
1 smaller frames hidden
2 smaller frames hidden
Estimated from 731 samples; phase durations are exact. Frames from pytest and pluggy are hidden .

Hot lines in your code

confs/tests.py:1175
self.owner = User.objects.create_user("owner", password="pw")
TestEditConference.setUp · Password hashing
251 ms
confs/tests.py:1177
self.staff = User.objects.create_user("staff", password="pw", is_staff=True)
TestEditConference.setUp · Password hashing
244 ms
confs/tests.py:1176
self.other = User.objects.create_user("other", password="pw")
TestEditConference.setUp · Password hashing
243 ms
confs/views.py:548
return render(
edit_conference · Templates
16 ms
confs/tests.py:1213
response = self.client.get(self.url)
TestEditConference.test_owner_can_view_edit_form · Libraries
6 ms
confs/tests.py:1212
self.client.force_login(self.owner)
TestEditConference.test_owner_can_view_edit_form · Database
3 ms
confs/tests.py:1178
self.conference = baker.make(
TestEditConference.setUp · Database
1 ms

Fixtures

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

Database

30 queries · 9 ms

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

3×
INSERT INTO "auth_user" ("password", "last_login", "is_superuser", "username", "first_name", "last_name", "email", "is_staff", "is_active", "date_joined") VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s) RETURNING "auth_user"."id"

Biggest pieces of work

call setUp
confs/tests.py:1175
740 ms
call test body
confs/tests.py:1213
25 ms
setup __init__
<stdlib>/inspect.py:3048
0.60 ms

Reliability

14 results · 0 CI failures · 0 local failures

This test hasn't failed recently.

History

Latest 14 results, oldest first in the strip
When Environment Outcome Duration Commit
2 weeks ago CI github-actions:test passed 766 ms 28600ed main Profile
2 weeks, 5 days ago CI github-actions:test passed 1.13 s 600b717 main Profile
2 weeks, 6 days ago CI github-actions:test passed 1.03 s c28a326 main Profile
3 weeks ago CI github-actions:test passed 675 ms 9b8826a main Profile
3 weeks ago CI github-actions:test passed 1.05 s 4f01055 main Profile
1 month ago CI github-actions:test passed 1.03 s 8ab642e main Profile
1 month ago CI github-actions:test passed 1.30 s 9b75244 main Profile
1 month ago CI github-actions:test passed 1.07 s 9603516 main Profile
1 month, 1 week ago CI github-actions:test passed 1.48 s 615a272 main Profile
1 month, 1 week ago CI github-actions:test passed 950 ms d923a46 main Profile
1 month, 1 week ago CI github-actions:test passed 3.04 s 82997f8 main Profile
1 month, 1 week ago CI github-actions:test passed 1.11 s 623aa3e main Profile
1 month, 1 week ago CI github-actions:test passed 2.53 s ab6465a main Profile
1 month, 1 week ago CI github-actions:test passed 1.46 s 0c23747 main Run