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

TestConferenceApprovalVisibility::test_anonymous_sees_only_approved

First seen 12 hours ago in 0c23747
CI github-actions:test 4 runs
Average
698 ms
median 684 ms
max 890 ms
Phases
Setup 10 ms Call 688 ms Teardown 0.31 ms
Categories
Password hashing 627 ms Database 30 ms Factories 0.80 ms Other (Libraries, Templates, pytest, Unsampled) 41 ms

18 database queries per run

Needs 1 MB of memory (max 2 MB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, 7 hours ago · open run
Show pytest frames
setup7 ms1.3%
TestCase.setUpClassdjango/test/testcases.py:1426 cls.cls_atomics = cls._enter_atomics()7 ms1.3%
TestCase._enter_atomicsdjango/test/testcases.py:13997 ms1.3%
Atomic.__enter__django/db/transaction.py:2107 ms1.3%
BaseDatabaseWrapper.get_autocommitdjango/db/backends/base/base.py:4547 ms1.3%
SimpleTestCase.ensure_connection_patch_method.<locals>.patched_ensure_connectiondjango/test/testcases.py:3047 ms1.3%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:267 ms1.3%
BaseDatabaseWrapper.ensure_connectiondjango/db/backends/base/base.py:2797 ms1.3%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:267 ms1.3%
BaseDatabaseWrapper.connectdjango/db/backends/base/base.py:2567 ms1.3%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:267 ms1.3%
DatabaseWrapper.get_new_connectiondjango/db/backends/postgresql/base.py:3457 ms1.3%
Connection.connectpsycopg/connection.py:1097 ms1.3%
wait_connpsycopg/waiting.py:1414 ms0.8%
EpollSelector.select<stdlib>/selectors.py:4524 ms0.8%
wait_connpsycopg/waiting.py:1453 ms0.5%
BaseConnection._connect_genpsycopg/_connection_base.py:4393 ms0.5%
call529 ms98.7%
TestConferenceApprovalVisibility.setUpconfs/tests.py:1316 self.owner = User.objects.create_user("owner", password="pw")248 ms46.3%
UserManager.create_userdjango/contrib/auth/models.py:180248 ms46.3%
UserManager._create_userdjango/contrib/auth/models.py:167245 ms45.7%
UserManager._create_user_objectdjango/contrib/auth/models.py:160245 ms45.7%
make_passworddjango/contrib/auth/hashers.py:118244 ms45.5%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333244 ms45.5%
pbkdf2django/utils/crypto.py:93244 ms45.5%
1 smaller frames hidden
UserManager._create_userdjango/contrib/auth/models.py:1683 ms0.6%
AbstractBaseUser.savedjango/contrib/auth/base_user.py:623 ms0.6%
Model.savedjango/db/models/base.py:9043 ms0.6%
TestConferenceApprovalVisibility.setUpconfs/tests.py:1317 self.other = User.objects.create_user("other", password="pw")247 ms46.1%
UserManager.create_userdjango/contrib/auth/models.py:180247 ms46.1%
UserManager._create_userdjango/contrib/auth/models.py:167246 ms45.9%
UserManager._create_user_objectdjango/contrib/auth/models.py:160246 ms45.9%
make_passworddjango/contrib/auth/hashers.py:118246 ms45.9%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333246 ms45.9%
pbkdf2django/utils/crypto.py:93246 ms45.9%
1 smaller frames hidden
TestConferenceApprovalVisibility.test_anonymous_sees_only_approvedconfs/tests.py:1337 response = self.client.get(reverse("conferences"))28 ms5.3%
Client.getdjango/test/client.py:113328 ms5.3%
RequestFactory.getdjango/test/client.py:47528 ms5.3%
RequestFactory.genericdjango/test/client.py:67128 ms5.3%
Client.requestdjango/test/client.py:109128 ms5.3%
ClientHandler.__call__django/test/client.py:18620 ms3.7%
BaseHandler.get_responsedjango/core/handlers/base.py:14220 ms3.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5620 ms3.7%
MiddlewareMixin.__call__django/utils/deprecation.py:38020 ms3.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5620 ms3.7%
MiddlewareMixin.__call__django/utils/deprecation.py:38020 ms3.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5620 ms3.7%
MiddlewareMixin.__call__django/utils/deprecation.py:38020 ms3.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5620 ms3.7%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:12320 ms3.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5620 ms3.7%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:14520 ms3.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5620 ms3.7%
MiddlewareMixin.__call__django/utils/deprecation.py:38020 ms3.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5620 ms3.7%
MiddlewareMixin.__call__django/utils/deprecation.py:38020 ms3.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5620 ms3.7%
MiddlewareMixin.__call__django/utils/deprecation.py:38020 ms3.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5620 ms3.7%
MiddlewareMixin.__call__django/utils/deprecation.py:38020 ms3.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5620 ms3.7%
MiddlewareMixin.__call__django/utils/deprecation.py:38020 ms3.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5620 ms3.7%
MiddlewareMixin.__call__django/utils/deprecation.py:38020 ms3.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5620 ms3.7%
MiddlewareMixin.__call__django/utils/deprecation.py:38020 ms3.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5620 ms3.7%
BaseHandler._get_responsedjango/core/handlers/base.py:19920 ms3.7%
conferencesconfs/views.py:128 return render(17 ms3.2%
renderdjango/shortcuts.py:2717 ms3.2%
render_to_stringdjango/template/loader.py:6217 ms3.2%
Template.renderdjango/template/backends/django.py:10717 ms3.2%
Template.renderdjango/template/base.py:17517 ms3.2%
instrumented_test_renderdjango/test/utils.py:11317 ms3.2%
NodeList.renderdjango/template/base.py:110817 ms3.2%
Node.render_annotateddjango/template/base.py:106917 ms3.2%
ExtendsNode.renderdjango/template/loader_tags.py:16017 ms3.2%
instrumented_test_renderdjango/test/utils.py:11317 ms3.2%
NodeList.renderdjango/template/base.py:110817 ms3.2%
Node.render_annotateddjango/template/base.py:106917 ms3.2%
BlockNode.renderdjango/template/loader_tags.py:6616 ms3.0%
NodeList.renderdjango/template/base.py:110816 ms3.0%
Node.render_annotateddjango/template/base.py:106916 ms3.0%
IfNode.renderdjango/template/defaulttags.py:3328 ms1.6%
QuerySet.__bool__django/db/models/query.py:4538 ms1.6%
QuerySet._fetch_alldjango/db/models/query.py:22626 ms1.2%
ModelIterable.__iter__django/db/models/query.py:1036 ms1.2%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16255 ms1.0%
CursorWrapper.executedjango/db/backends/utils.py:795 ms1.0%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:925 ms1.0%
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
1 smaller frames hidden
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%
ZipFile._RealGetContents<stdlib>/zipfile/__init__.py:16083 ms0.6%
3 smaller frames hidden
1 smaller frames hidden
1 smaller frames hidden
conferencesconfs/views.py:41 for al in ConferenceLookup.objects.values("language").annotate(count=Count("language")).order_by("-count")3 ms0.6%
QuerySet.__iter__django/db/models/query.py:4393 ms0.6%
QuerySet._fetch_alldjango/db/models/query.py:22623 ms0.6%
ValuesIterable.__iter__django/db/models/query.py:2473 ms0.6%
SQLCompiler.results_iterdjango/db/models/sql/compiler.py:15743 ms0.6%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16253 ms0.6%
CursorWrapper.executedjango/db/backends/utils.py:793 ms0.6%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:923 ms0.6%
CursorWrapper._executedjango/db/backends/utils.py:1053 ms0.6%
Cursor.executepsycopg/cursor.py:1133 ms0.6%
Connection.waitpsycopg/connection.py:4953 ms0.6%
ClientHandler.__call__django/test/client.py:1738 ms1.6%
BaseHandler.load_middlewaredjango/core/handlers/base.py:638 ms1.6%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:1048 ms1.6%
WhiteNoise.add_fileswhitenoise/base.py:1088 ms1.6%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1206 ms1.2%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:1316 ms1.2%
WhiteNoise.get_static_filewhitenoise/base.py:2174 ms0.8%
1 smaller frames hidden
1 smaller frames hidden
3 smaller frames hidden
Estimated from 506 samples; phase durations are exact. Frames from pytest and pluggy are hidden .

Hot lines in your code

confs/tests.py:1316
self.owner = User.objects.create_user("owner", password="pw")
TestConferenceApprovalVisibility.setUp · Password hashing
248 ms
confs/tests.py:1317
self.other = User.objects.create_user("other", password="pw")
TestConferenceApprovalVisibility.setUp · Password hashing
247 ms
confs/views.py:128
return render(
conferences · Database
17 ms
confs/tests.py:1337
response = self.client.get(reverse("conferences"))
TestConferenceApprovalVisibility.test_anonymous_sees_only_approved · Libraries
8 ms
confs/views.py:41
for al in ConferenceLookup.objects.values("language").annotate(count=Count("language")).order_by("-count")
conferences · Database
3 ms
confs/tests.py:1318
self.approved = baker.make(
TestConferenceApprovalVisibility.setUp · Factories
2 ms
confs/tests.py:1326
self.pending = baker.make(
TestConferenceApprovalVisibility.setUp · Factories
1 ms

Fixtures

Exact setup time
_unittest_setUpClass_fixture_TestConferenceApprovalVisibility class 6 ms
_django_setup_unittest class 0.23 ms
_dj_autoclear_mailbox function 0.03 ms
_django_db_marker function 0.03 ms
_template_string_if_invalid_marker function 0.03 ms
_live_server_helper function 0.02 ms
_django_isolate_apps function 0.02 ms
_django_clear_site_cache function 0.02 ms
_django_set_urlconf 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
498 ms
call test body
confs/tests.py:1337
28 ms
setup setUpClass
django/test/testcases.py:1426
7 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 535 ms d923a46 main Profile
7 hours ago CI github-actions:test passed 699 ms 82997f8 main Profile
7 hours ago CI github-actions:test passed 669 ms 623aa3e main Profile
12 hours ago CI github-actions:test passed 890 ms ab6465a main Profile
12 hours ago CI github-actions:test passed 647 ms 0c23747 main Run