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

TestConferenceApprovalVisibility::test_owner_sees_own_pending

First seen 12 hours ago in 0c23747
CI github-actions:test 4 runs
Average
1.70 s
median 1.92 s
max 2.02 s
Phases
Setup 3 ms Call 1.69 s Teardown 0.37 ms
Categories
Password hashing 1.51 s Database 59 ms App code 0.25 ms Other (Libraries, Templates, pytest, Unsampled, ...) 125 ms

35 database queries per run

Needs 1 KB of memory (max 4 KB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, 7 hours ago · open run
Show pytest frames
setup0.97 ms0.1%
call909 ms99.8%
TestConferenceApprovalVisibility.setUpconfs/tests.py:1317 self.other = User.objects.create_user("other", password="pw")433 ms47.6%
UserManager.create_userdjango/contrib/auth/models.py:180433 ms47.6%
UserManager._create_userdjango/contrib/auth/models.py:167431 ms47.4%
UserManager._create_user_objectdjango/contrib/auth/models.py:160431 ms47.4%
make_passworddjango/contrib/auth/hashers.py:118431 ms47.4%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333431 ms47.4%
pbkdf2django/utils/crypto.py:93431 ms47.4%
1 smaller frames hidden
TestConferenceApprovalVisibility.setUpconfs/tests.py:1316 self.owner = User.objects.create_user("owner", password="pw")414 ms45.4%
UserManager.create_userdjango/contrib/auth/models.py:180414 ms45.4%
UserManager._create_userdjango/contrib/auth/models.py:167413 ms45.3%
UserManager._create_user_objectdjango/contrib/auth/models.py:160413 ms45.3%
make_passworddjango/contrib/auth/hashers.py:118413 ms45.3%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333413 ms45.3%
pbkdf2django/utils/crypto.py:93413 ms45.3%
1 smaller frames hidden
TestConferenceApprovalVisibility.test_owner_sees_own_pendingconfs/tests.py:1343 response = self.client.get(reverse("conferences"))47 ms5.1%
Client.getdjango/test/client.py:113347 ms5.1%
RequestFactory.getdjango/test/client.py:47547 ms5.1%
RequestFactory.genericdjango/test/client.py:67147 ms5.1%
Client.requestdjango/test/client.py:109147 ms5.1%
ClientHandler.__call__django/test/client.py:17323 ms2.5%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6322 ms2.4%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10422 ms2.4%
WhiteNoise.add_fileswhitenoise/base.py:10822 ms2.4%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12015 ms1.6%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:13115 ms1.6%
WhiteNoise.get_static_filewhitenoise/base.py:21710 ms1.1%
StaticFile.__init__whitenoise/responders.py:738 ms0.9%
1 smaller frames hidden
2 smaller frames hidden
WhiteNoise.update_files_dictionarywhitenoise/base.py:1157 ms0.8%
scantreewhitenoise/base.py:2717 ms0.8%
scantreewhitenoise/base.py:2716 ms0.7%
1 smaller frames hidden
1 smaller frames hidden
ClientHandler.__call__django/test/client.py:18623 ms2.5%
BaseHandler.get_responsedjango/core/handlers/base.py:14223 ms2.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5623 ms2.5%
MiddlewareMixin.__call__django/utils/deprecation.py:38023 ms2.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5623 ms2.5%
MiddlewareMixin.__call__django/utils/deprecation.py:38023 ms2.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5623 ms2.5%
MiddlewareMixin.__call__django/utils/deprecation.py:38023 ms2.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5623 ms2.5%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:12323 ms2.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5623 ms2.5%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:14523 ms2.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5623 ms2.5%
MiddlewareMixin.__call__django/utils/deprecation.py:38020 ms2.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5620 ms2.2%
MiddlewareMixin.__call__django/utils/deprecation.py:38020 ms2.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5620 ms2.2%
MiddlewareMixin.__call__django/utils/deprecation.py:38020 ms2.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5620 ms2.2%
MiddlewareMixin.__call__django/utils/deprecation.py:38020 ms2.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5620 ms2.2%
MiddlewareMixin.__call__django/utils/deprecation.py:38020 ms2.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5620 ms2.2%
MiddlewareMixin.__call__django/utils/deprecation.py:38020 ms2.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5620 ms2.2%
MiddlewareMixin.__call__django/utils/deprecation.py:38020 ms2.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5620 ms2.2%
BaseHandler._get_responsedjango/core/handlers/base.py:19920 ms2.2%
conferencesconfs/views.py:128 return render(18 ms1.9%
renderdjango/shortcuts.py:2718 ms1.9%
render_to_stringdjango/template/loader.py:6218 ms1.9%
Template.renderdjango/template/backends/django.py:10718 ms1.9%
Template.renderdjango/template/base.py:17518 ms1.9%
instrumented_test_renderdjango/test/utils.py:11318 ms1.9%
NodeList.renderdjango/template/base.py:110818 ms1.9%
Node.render_annotateddjango/template/base.py:106918 ms1.9%
ExtendsNode.renderdjango/template/loader_tags.py:16018 ms1.9%
instrumented_test_renderdjango/test/utils.py:11318 ms1.9%
NodeList.renderdjango/template/base.py:110818 ms1.9%
Node.render_annotateddjango/template/base.py:106918 ms1.9%
BlockNode.renderdjango/template/loader_tags.py:6617 ms1.8%
NodeList.renderdjango/template/base.py:110817 ms1.8%
Node.render_annotateddjango/template/base.py:106917 ms1.8%
IfNode.renderdjango/template/defaulttags.py:33212 ms1.4%
QuerySet.__bool__django/db/models/query.py:45312 ms1.4%
QuerySet._fetch_alldjango/db/models/query.py:22627 ms0.8%
ModelIterable.__iter__django/db/models/query.py:1037 ms0.8%
QuerySet._fetch_alldjango/db/models/query.py:22645 ms0.6%
QuerySet._prefetch_related_objectsdjango/db/models/query.py:14905 ms0.6%
prefetch_related_objectsdjango/db/models/query.py:27245 ms0.6%
2 smaller frames hidden
1 smaller frames hidden
1 smaller frames hidden
1 smaller frames hidden
1 smaller frames hidden
TestConferenceApprovalVisibility.test_owner_sees_own_pendingconfs/tests.py:1342 self.client.force_login(self.owner)8 ms0.9%
ClientMixin.force_logindjango/test/client.py:8588 ms0.9%
4 smaller frames hidden
teardown0.51 ms0.1%
Estimated from 877 samples; phase durations are exact. Frames from pytest and pluggy are hidden .

Hot lines in your code

confs/tests.py:1317
self.other = User.objects.create_user("other", password="pw")
TestConferenceApprovalVisibility.setUp · Password hashing
433 ms
confs/tests.py:1316
self.owner = User.objects.create_user("owner", password="pw")
TestConferenceApprovalVisibility.setUp · Password hashing
414 ms
confs/tests.py:1343
response = self.client.get(reverse("conferences"))
TestConferenceApprovalVisibility.test_owner_sees_own_pending · Libraries
25 ms
confs/views.py:128
return render(
conferences · Database
17 ms
confs/tests.py:1342
self.client.force_login(self.owner)
TestConferenceApprovalVisibility.test_owner_sees_own_pending · Database
8 ms
confs/tests.py:1326
self.pending = baker.make(
TestConferenceApprovalVisibility.setUp · Database
2 ms
confs/tests.py:1318
self.approved = baker.make(
TestConferenceApprovalVisibility.setUp · Database
2 ms
confs/views.py:41
for al in ConferenceLookup.objects.values("language").annotate(count=Count("language")).order_by("-count")
conferences · App code
2 ms
confs/views.py:85
if request.user.is_authenticated:
conferences · Database
2 ms
confs/models.py:266
return static(self.icon)
ConferenceTag.icon_url · Templates
1 ms

Fixtures

Exact setup time
_dj_autoclear_mailbox function 0.05 ms
_template_string_if_invalid_marker function 0.04 ms
_django_db_marker function 0.03 ms
_django_isolate_apps function 0.03 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.02 ms

Database

35 queries · 17 ms

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

3×
SELECT "confs_conference"."id", "confs_conference"."name", "confs_conference"."slug", "confs_conference"."location", "confs_conference"."start_date", "confs_conference"."end_date", "confs_conference"."time_zone", "confs_conference"."archived_date", "confs_conference"."approved_at", "confs_conferenc…

Biggest pieces of work

call setUp
confs/tests.py:1317
851 ms
call test body
confs/tests.py:1343
55 ms
call _pre_setup
django/test/testcases.py:1167
1 ms
call _post_teardown
django/test/testcases.py:1243
1 ms
call pytest internals 1 ms

Reliability

5 results · 0 CI failures · 0 local failures

This test hasn't failed recently.

History

Latest 5 results, oldest first in the strip
When Environment Outcome Duration Commit
7 hours ago CI github-actions:test passed 911 ms d923a46 main Profile
7 hours ago CI github-actions:test passed 1.95 s 82997f8 main Profile
7 hours ago CI github-actions:test passed 2.02 s 623aa3e main Profile
12 hours ago CI github-actions:test passed 1.89 s ab6465a main Profile
12 hours ago CI github-actions:test passed 950 ms 0c23747 main Run