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

TestConferenceApprovalVisibility::test_anonymous_sees_only_approved

First seen 1 month, 1 week ago in 0c23747
CI github-actions:test 13 runs
Average
688 ms
median 694 ms
max 890 ms
Phases
Setup 9 ms Call 679 ms Teardown 0.28 ms
Categories
Password hashing 614 ms Database 33 ms Factories 0.41 ms App code 0.16 ms Test code 0.08 ms Other (Libraries, Templates, pytest, Unsampled) 40 ms

18 database queries per run

Needs 999 KB of memory (max 2 MB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, 2 weeks ago · open run
Show pytest frames
setup7 ms1.2%
TestCase.setUpClassdjango/test/testcases.py:1426 cls.cls_atomics = cls._enter_atomics()6 ms1.0%
TestCase._enter_atomicsdjango/test/testcases.py:13996 ms1.0%
Atomic.__enter__django/db/transaction.py:2106 ms1.0%
BaseDatabaseWrapper.get_autocommitdjango/db/backends/base/base.py:4546 ms1.0%
SimpleTestCase.ensure_connection_patch_method.<locals>.patched_ensure_connectiondjango/test/testcases.py:3046 ms1.0%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:266 ms1.0%
BaseDatabaseWrapper.ensure_connectiondjango/db/backends/base/base.py:2796 ms1.0%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:266 ms1.0%
BaseDatabaseWrapper.connectdjango/db/backends/base/base.py:2566 ms1.0%
DatabaseWrapper.get_new_connectionfedidevs/db/postgresql/base.py:39 return super().get_new_connection(conn_params)6 ms1.0%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:266 ms1.0%
DatabaseWrapper.get_new_connectiondjango/db/backends/postgresql/base.py:3456 ms1.0%
Connection.connectpsycopg/connection.py:1096 ms1.0%
wait_connpsycopg/waiting.py:1413 ms0.6%
1 smaller frames hidden
1 smaller frames hidden
call539 ms98.7%
TestConferenceApprovalVisibility.setUpconfs/tests.py:1317 self.other = User.objects.create_user("other", password="pw")252 ms46.1%
UserManager.create_userdjango/contrib/auth/models.py:180252 ms46.1%
UserManager._create_userdjango/contrib/auth/models.py:167250 ms45.9%
UserManager._create_user_objectdjango/contrib/auth/models.py:160250 ms45.9%
make_passworddjango/contrib/auth/hashers.py:118250 ms45.9%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333250 ms45.9%
pbkdf2django/utils/crypto.py:93250 ms45.9%
1 smaller frames hidden
TestConferenceApprovalVisibility.setUpconfs/tests.py:1316 self.owner = User.objects.create_user("owner", password="pw")247 ms45.3%
UserManager.create_userdjango/contrib/auth/models.py:180247 ms45.3%
UserManager._create_userdjango/contrib/auth/models.py:167245 ms44.9%
UserManager._create_user_objectdjango/contrib/auth/models.py:160245 ms44.9%
make_passworddjango/contrib/auth/hashers.py:118245 ms44.9%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333245 ms44.9%
pbkdf2django/utils/crypto.py:93245 ms44.9%
1 smaller frames hidden
TestConferenceApprovalVisibility.test_anonymous_sees_only_approvedconfs/tests.py:1337 response = self.client.get(reverse("conferences"))36 ms6.6%
Client.getdjango/test/client.py:113336 ms6.6%
RequestFactory.getdjango/test/client.py:47536 ms6.6%
RequestFactory.genericdjango/test/client.py:67136 ms6.6%
Client.requestdjango/test/client.py:109136 ms6.6%
ClientHandler.__call__django/test/client.py:18626 ms4.8%
BaseHandler.get_responsedjango/core/handlers/base.py:14226 ms4.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5626 ms4.8%
MiddlewareMixin.__call__django/utils/deprecation.py:38026 ms4.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5626 ms4.8%
MiddlewareMixin.__call__django/utils/deprecation.py:38026 ms4.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5626 ms4.8%
MiddlewareMixin.__call__django/utils/deprecation.py:38026 ms4.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5626 ms4.8%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:12326 ms4.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5626 ms4.8%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:14526 ms4.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5626 ms4.8%
MiddlewareMixin.__call__django/utils/deprecation.py:38026 ms4.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5626 ms4.8%
MiddlewareMixin.__call__django/utils/deprecation.py:38026 ms4.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5626 ms4.8%
MiddlewareMixin.__call__django/utils/deprecation.py:38026 ms4.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5626 ms4.8%
MiddlewareMixin.__call__django/utils/deprecation.py:38026 ms4.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5626 ms4.8%
MiddlewareMixin.__call__django/utils/deprecation.py:38026 ms4.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5626 ms4.8%
MiddlewareMixin.__call__django/utils/deprecation.py:38026 ms4.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5626 ms4.8%
MiddlewareMixin.__call__django/utils/deprecation.py:38026 ms4.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5626 ms4.8%
BaseHandler._get_responsedjango/core/handlers/base.py:19926 ms4.8%
conferencesconfs/views.py:128 return render(22 ms4.0%
renderdjango/shortcuts.py:2722 ms4.0%
render_to_stringdjango/template/loader.py:6222 ms4.0%
Template.renderdjango/template/backends/django.py:10722 ms4.0%
Template.renderdjango/template/base.py:17522 ms4.0%
instrumented_test_renderdjango/test/utils.py:11322 ms4.0%
NodeList.renderdjango/template/base.py:110822 ms4.0%
Node.render_annotateddjango/template/base.py:106922 ms4.0%
ExtendsNode.renderdjango/template/loader_tags.py:16022 ms4.0%
instrumented_test_renderdjango/test/utils.py:11322 ms4.0%
NodeList.renderdjango/template/base.py:110822 ms4.0%
Node.render_annotateddjango/template/base.py:106922 ms4.0%
BlockNode.renderdjango/template/loader_tags.py:6619 ms3.5%
NodeList.renderdjango/template/base.py:110819 ms3.5%
Node.render_annotateddjango/template/base.py:106919 ms3.5%
IfNode.renderdjango/template/defaulttags.py:3329 ms1.7%
QuerySet.__bool__django/db/models/query.py:4539 ms1.7%
QuerySet._fetch_alldjango/db/models/query.py:22625 ms1.0%
ModelIterable.__iter__django/db/models/query.py:1035 ms1.0%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16254 ms0.8%
CursorWrapper.executedjango/db/backends/utils.py:794 ms0.8%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:924 ms0.8%
CursorWrapper._executedjango/db/backends/utils.py:1054 ms0.8%
Cursor.executepsycopg/cursor.py:1134 ms0.8%
Connection.waitpsycopg/connection.py:4954 ms0.8%
1 smaller frames hidden
QuerySet._fetch_alldjango/db/models/query.py:22644 ms0.8%
QuerySet._prefetch_related_objectsdjango/db/models/query.py:14904 ms0.8%
prefetch_related_objectsdjango/db/models/query.py:27244 ms0.8%
SimpleNode.renderdjango/template/library.py:3436 ms1.2%
heroicon_outlineheroicons/templatetags/heroicons.py:236 ms1.2%
_render_iconheroicons/templatetags/heroicons.py:416 ms1.2%
_render_iconheroicons/__init__.py:476 ms1.2%
_load_iconheroicons/__init__.py:186 ms1.2%
ZipFile.__init__<stdlib>/zipfile/__init__.py:15056 ms1.2%
IfNode.renderdjango/template/defaulttags.py:3333 ms0.6%
NodeList.renderdjango/template/base.py:11083 ms0.6%
Node.render_annotateddjango/template/base.py:10693 ms0.6%
WithNode.renderdjango/template/defaulttags.py:5813 ms0.6%
NodeList.renderdjango/template/base.py:11083 ms0.6%
Node.render_annotateddjango/template/base.py:10693 ms0.6%
IfNode.renderdjango/template/defaulttags.py:3333 ms0.6%
NodeList.renderdjango/template/base.py:11083 ms0.6%
Node.render_annotateddjango/template/base.py:10693 ms0.6%
SimpleNode.renderdjango/template/library.py:3433 ms0.6%
heroicon_outlineheroicons/templatetags/heroicons.py:233 ms0.6%
_render_iconheroicons/templatetags/heroicons.py:413 ms0.6%
_render_iconheroicons/__init__.py:473 ms0.6%
_load_iconheroicons/__init__.py:183 ms0.6%
ZipFile.__init__<stdlib>/zipfile/__init__.py:15053 ms0.6%
3 smaller frames hidden
ClientHandler.__call__django/test/client.py:1739 ms1.7%
BaseHandler.load_middlewaredjango/core/handlers/base.py:639 ms1.7%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:1049 ms1.7%
WhiteNoise.add_fileswhitenoise/base.py:1089 ms1.7%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1205 ms1.0%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:1315 ms1.0%
WhiteNoise.get_static_filewhitenoise/base.py:2175 ms1.0%
StaticFile.__init__whitenoise/responders.py:773 ms0.6%
StaticFile.get_alternativeswhitenoise/responders.py:2003 ms0.6%
2 smaller frames hidden
WhiteNoise.update_files_dictionarywhitenoise/base.py:1154 ms0.8%
scantreewhitenoise/base.py:2713 ms0.6%
scantreewhitenoise/base.py:2713 ms0.6%
1 smaller frames hidden
3 smaller frames hidden
Estimated from 518 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
252 ms
confs/tests.py:1316
self.owner = User.objects.create_user("owner", password="pw")
TestConferenceApprovalVisibility.setUp · Password hashing
247 ms
confs/views.py:128
return render(
conferences · Templates
22 ms
confs/tests.py:1337
response = self.client.get(reverse("conferences"))
TestConferenceApprovalVisibility.test_anonymous_sees_only_approved · Libraries
9 ms
fedidevs/db/postgresql/base.py:39
return super().get_new_connection(conn_params)
DatabaseWrapper.get_new_connection · Database
6 ms
confs/views.py:41
for al in ConferenceLookup.objects.values("language").annotate(count=Count("language")).order_by("-count")
conferences · Database
2 ms
confs/tests.py:1318
self.approved = baker.make(
TestConferenceApprovalVisibility.setUp · Database
2 ms
confs/tests.py:1326
self.pending = baker.make(
TestConferenceApprovalVisibility.setUp · Database
1 ms
confs/views.py:38
def conferences(request, lang: str | None = None):
conferences · Libraries
1 ms
confs/views.py:93
.annotate(posts_count=Count("conferencepost", filter=Q(conferencepost__created_at__gt=F("posts_after"))))
conferences · Database
1 ms

Fixtures

Exact setup time
_unittest_setUpClass_fixture_TestConferenceApprovalVisibility class 6 ms
_django_setup_unittest class 0.17 ms
_django_db_marker function 0.03 ms
_template_string_if_invalid_marker function 0.03 ms
_dj_autoclear_mailbox function 0.03 ms
_django_isolate_apps function 0.02 ms
_live_server_helper function 0.02 ms
_django_set_urlconf function 0.02 ms
_django_clear_site_cache function 0.02 ms
monkeypatch function 0.01 ms

Database

18 queries · 16 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
502 ms
call test body
confs/tests.py:1337
36 ms
setup setUpClass
django/test/testcases.py:1426
7 ms
call _post_teardown
django/test/testcases.py:1243
1 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 546 ms 28600ed main Profile
2 weeks, 5 days ago CI github-actions:test passed 715 ms 600b717 main Profile
2 weeks, 6 days ago CI github-actions:test passed 687 ms c28a326 main Profile
3 weeks ago CI github-actions:test passed 462 ms 9b8826a main Profile
3 weeks ago CI github-actions:test passed 688 ms 4f01055 main Profile
1 month ago CI github-actions:test passed 699 ms 8ab642e main Profile
1 month ago CI github-actions:test passed 864 ms 9b75244 main Profile
1 month ago CI github-actions:test passed 792 ms 9603516 main Profile
1 month, 1 week ago CI github-actions:test passed 694 ms 615a272 main Profile
1 month, 1 week ago CI github-actions:test passed 535 ms d923a46 main Profile
1 month, 1 week ago CI github-actions:test passed 699 ms 82997f8 main Profile
1 month, 1 week ago CI github-actions:test passed 669 ms 623aa3e main Profile
1 month, 1 week ago CI github-actions:test passed 890 ms ab6465a main Profile
1 month, 1 week ago CI github-actions:test passed 647 ms 0c23747 main Run