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

TestCreateConference::test_rejects_more_than_three_icons

First seen 1 month, 1 week ago in 0c23747
CI github-actions:test 13 runs
Average
861 ms
median 773 ms
max 1.65 s
Phases
Setup 2 ms Call 858 ms Teardown 0.39 ms
Categories
Password hashing 597 ms Database 39 ms Test code 0.25 ms App code 0.08 ms Other (Libraries, Templates, Deep copies, pytest, ...) 225 ms

31 database queries per run

Needs 157 KB of memory (max 684 KB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, 2 weeks ago · open run
Show pytest frames
call747 ms99.9%
TestCreateConference.setUpconfs/tests.py:1044 self.user = User.objects.create_user("alice", password="pw")522 ms69.8%
UserManager.create_userdjango/contrib/auth/models.py:180522 ms69.8%
UserManager._create_userdjango/contrib/auth/models.py:167521 ms69.7%
UserManager._create_user_objectdjango/contrib/auth/models.py:160521 ms69.7%
make_passworddjango/contrib/auth/hashers.py:118521 ms69.7%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333521 ms69.7%
pbkdf2django/utils/crypto.py:93521 ms69.7%
1 smaller frames hidden
TestCreateConference.test_rejects_more_than_three_iconsconfs/tests.py:1153 response = self.client.post(reverse("create_conference"), data)206 ms27.6%
Client.postdjango/test/client.py:1162206 ms27.6%
RequestFactory.postdjango/test/client.py:499206 ms27.6%
RequestFactory.genericdjango/test/client.py:671206 ms27.6%
Client.requestdjango/test/client.py:1091206 ms27.6%
ClientHandler.__call__django/test/client.py:173199 ms26.6%
BaseHandler.load_middlewaredjango/core/handlers/base.py:63199 ms26.6%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:104199 ms26.6%
WhiteNoise.add_fileswhitenoise/base.py:108199 ms26.6%
WhiteNoise.update_files_dictionarywhitenoise/base.py:120186 ms24.9%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:131185 ms24.8%
WhiteNoise.get_static_filewhitenoise/base.py:217178 ms23.8%
StaticFile.__init__whitenoise/responders.py:72174 ms23.2%
StaticFile.get_file_statswhitenoise/responders.py:163170 ms22.8%
<GC>~170 ms22.8%
1 smaller frames hidden
3 smaller frames hidden
WhiteNoise.get_static_filewhitenoise/base.py:2127 ms1.0%
WhiteNoise.add_cache_headerswhitenoise/base.py:2337 ms1.0%
WhiteNoiseMiddleware.immutable_file_testwhitenoise/middleware.py:1767 ms1.0%
WhiteNoiseMiddleware.get_static_urlwhitenoise/middleware.py:1977 ms1.0%
LazyObject.__getattribute__django/utils/functional.py:2804 ms0.6%
1 smaller frames hidden
1 smaller frames hidden
WhiteNoise.update_files_dictionarywhitenoise/base.py:11513 ms1.7%
scantreewhitenoise/base.py:27113 ms1.7%
scantreewhitenoise/base.py:27113 ms1.7%
scantreewhitenoise/base.py:2717 ms1.0%
scantreewhitenoise/base.py:2717 ms1.0%
scantreewhitenoise/base.py:2696 ms0.8%
1 smaller frames hidden
scantreewhitenoise/base.py:2735 ms0.7%
ClientHandler.__call__django/test/client.py:1866 ms0.8%
BaseHandler.get_responsedjango/core/handlers/base.py:1426 ms0.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:566 ms0.8%
MiddlewareMixin.__call__django/utils/deprecation.py:3806 ms0.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:566 ms0.8%
MiddlewareMixin.__call__django/utils/deprecation.py:3806 ms0.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:566 ms0.8%
MiddlewareMixin.__call__django/utils/deprecation.py:3806 ms0.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:566 ms0.8%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:1236 ms0.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:566 ms0.8%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:1456 ms0.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:566 ms0.8%
MiddlewareMixin.__call__django/utils/deprecation.py:3806 ms0.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:566 ms0.8%
MiddlewareMixin.__call__django/utils/deprecation.py:3806 ms0.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:566 ms0.8%
MiddlewareMixin.__call__django/utils/deprecation.py:3806 ms0.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:566 ms0.8%
MiddlewareMixin.__call__django/utils/deprecation.py:3806 ms0.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:566 ms0.8%
MiddlewareMixin.__call__django/utils/deprecation.py:3806 ms0.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:566 ms0.8%
MiddlewareMixin.__call__django/utils/deprecation.py:3806 ms0.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:566 ms0.8%
MiddlewareMixin.__call__django/utils/deprecation.py:3806 ms0.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:566 ms0.8%
BaseHandler._get_responsedjango/core/handlers/base.py:1996 ms0.8%
user_passes_test.<locals>.decorator.<locals>._view_wrapperdjango/contrib/auth/decorators.py:626 ms0.8%
create_conferenceconfs/views.py:509 return render(6 ms0.8%
renderdjango/shortcuts.py:276 ms0.8%
render_to_stringdjango/template/loader.py:626 ms0.8%
Template.renderdjango/template/backends/django.py:1076 ms0.8%
Template.renderdjango/template/base.py:1756 ms0.8%
instrumented_test_renderdjango/test/utils.py:1136 ms0.8%
NodeList.renderdjango/template/base.py:11086 ms0.8%
Node.render_annotateddjango/template/base.py:10696 ms0.8%
ExtendsNode.renderdjango/template/loader_tags.py:1606 ms0.8%
instrumented_test_renderdjango/test/utils.py:1136 ms0.8%
NodeList.renderdjango/template/base.py:11086 ms0.8%
Node.render_annotateddjango/template/base.py:10696 ms0.8%
BlockNode.renderdjango/template/loader_tags.py:666 ms0.8%
NodeList.renderdjango/template/base.py:11086 ms0.8%
Node.render_annotateddjango/template/base.py:10696 ms0.8%
VariableNode.renderdjango/template/base.py:11736 ms0.8%
render_value_in_contextdjango/template/base.py:11506 ms0.8%
RenderableFieldMixin.__str__django/forms/utils.py:796 ms0.8%
BoundField.as_widgetdjango/forms/boundfield.py:1086 ms0.8%
Widget.renderdjango/forms/widgets.py:3766 ms0.8%
Widget._renderdjango/forms/widgets.py:3816 ms0.8%
BaseRenderer.renderdjango/forms/renderers.py:296 ms0.8%
Template.renderdjango/template/backends/django.py:1076 ms0.8%
Template.renderdjango/template/base.py:1756 ms0.8%
instrumented_test_renderdjango/test/utils.py:1136 ms0.8%
NodeList.renderdjango/template/base.py:11086 ms0.8%
Node.render_annotateddjango/template/base.py:10696 ms0.8%
ForNode.renderdjango/template/defaulttags.py:2496 ms0.8%
Node.render_annotateddjango/template/base.py:10695 ms0.7%
ForNode.renderdjango/template/defaulttags.py:2495 ms0.7%
Node.render_annotateddjango/template/base.py:10695 ms0.7%
IncludeNode.renderdjango/template/loader_tags.py:2115 ms0.7%
Template.renderdjango/template/base.py:1775 ms0.7%
1 smaller frames hidden
TestCreateConference.test_rejects_more_than_three_iconsconfs/tests.py:1150 self.client.force_login(self.user)16 ms2.1%
ClientMixin.force_logindjango/test/client.py:85816 ms2.1%
ClientMixin._logindjango/test/client.py:8899 ms1.3%
logindjango/contrib/auth/__init__.py:1897 ms1.0%
SessionBase.cycle_keydjango/contrib/sessions/backends/base.py:4376 ms0.8%
SessionStore.createdjango/contrib/sessions/backends/db.py:705 ms0.7%
SessionBase._get_new_session_keydjango/contrib/sessions/backends/base.py:2015 ms0.7%
SessionStore.existsdjango/contrib/sessions/backends/db.py:635 ms0.7%
QuerySet.existsdjango/db/models/query.py:14585 ms0.7%
Query.has_resultsdjango/db/models/sql/query.py:6875 ms0.7%
SQLCompiler.has_resultsdjango/db/models/sql/compiler.py:15935 ms0.7%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16255 ms0.7%
CursorWrapper.executedjango/db/backends/utils.py:795 ms0.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:925 ms0.7%
CursorWrapper._executedjango/db/backends/utils.py:1055 ms0.7%
Cursor.executepsycopg/cursor.py:1135 ms0.7%
Connection.waitpsycopg/connection.py:4955 ms0.7%
1 smaller frames hidden
1 smaller frames hidden
2 smaller frames hidden
2 smaller frames hidden
1 smaller frames hidden
Estimated from 714 samples; phase durations are exact. Frames from pytest and pluggy are hidden .

Hot lines in your code

confs/tests.py:1044
self.user = User.objects.create_user("alice", password="pw")
TestCreateConference.setUp · Password hashing
522 ms
confs/tests.py:1153
response = self.client.post(reverse("create_conference"), data)
TestCreateConference.test_rejects_more_than_three_icons · Libraries
200 ms
confs/tests.py:1150
self.client.force_login(self.user)
TestCreateConference.test_rejects_more_than_three_icons · Database
16 ms
confs/views.py:509
return render(
create_conference · Templates
6 ms
confs/tests.py:1149
tags = [ConferenceTag.objects.create(name=f"Tag {i}", slug=f"tag-{i}", icon="star.png") for i in range(4)]
TestCreateConference.test_rejects_more_than_three_icons · Database
3 ms

Fixtures

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

Database

31 queries · 19 ms

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

4×
INSERT INTO "confs_conferencetag" ("name", "slug", "icon") VALUES (%s, %s, %s) RETURNING "confs_conferencetag"."id"

Biggest pieces of work

call setUp
confs/tests.py:1044
522 ms
call test body
confs/tests.py:1153
225 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 747 ms 28600ed main Profile
2 weeks, 5 days ago CI github-actions:test passed 944 ms 600b717 main Profile
2 weeks, 6 days ago CI github-actions:test passed 773 ms c28a326 main Profile
3 weeks ago CI github-actions:test passed 562 ms 9b8826a main Profile
3 weeks ago CI github-actions:test passed 1.03 s 4f01055 main Profile
1 month ago CI github-actions:test passed 833 ms 8ab642e main Profile
1 month ago CI github-actions:test passed 587 ms 9b75244 main Profile
1 month ago CI github-actions:test passed 625 ms 9603516 main Profile
1 month, 1 week ago CI github-actions:test passed 589 ms 615a272 main Profile
1 month, 1 week ago CI github-actions:test passed 487 ms d923a46 main Profile
1 month, 1 week ago CI github-actions:test passed 1.03 s 82997f8 main Profile
1 month, 1 week ago CI github-actions:test passed 1.33 s 623aa3e main Profile
1 month, 1 week ago CI github-actions:test passed 1.65 s ab6465a main Profile
1 month, 1 week ago CI github-actions:test passed 673 ms 0c23747 main Run