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

TestConferenceApprovalVisibility::test_other_user_does_not_see_pending

First seen 12 hours ago in 0c23747
CI github-actions:test 4 runs
Average
1.78 s
median 1.98 s
max 2.29 s
Phases
Setup 17 ms Call 1.76 s Teardown 0.31 ms
Categories
Password hashing 1.58 s Database 76 ms Factories 0.70 ms Other (Libraries, Templates, pytest, Unsampled) 124 ms

35 database queries per run

Needs 52 KB of memory (max 132 KB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, 7 hours ago · open run
Show pytest frames
setup11 ms1.3%
TestCase.setUpClassdjango/test/testcases.py:1426 cls.cls_atomics = cls._enter_atomics()10 ms1.2%
TestCase._enter_atomicsdjango/test/testcases.py:139910 ms1.2%
Atomic.__enter__django/db/transaction.py:21010 ms1.2%
BaseDatabaseWrapper.get_autocommitdjango/db/backends/base/base.py:45410 ms1.2%
SimpleTestCase.ensure_connection_patch_method.<locals>.patched_ensure_connectiondjango/test/testcases.py:30410 ms1.2%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2610 ms1.2%
BaseDatabaseWrapper.ensure_connectiondjango/db/backends/base/base.py:27910 ms1.2%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2610 ms1.2%
BaseDatabaseWrapper.connectdjango/db/backends/base/base.py:25610 ms1.2%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2610 ms1.2%
DatabaseWrapper.get_new_connectiondjango/db/backends/postgresql/base.py:34510 ms1.2%
Connection.connectpsycopg/connection.py:1099 ms1.0%
wait_connpsycopg/waiting.py:1456 ms0.6%
BaseConnection._connect_genpsycopg/_connection_base.py:4396 ms0.6%
1 smaller frames hidden
1 smaller frames hidden
call873 ms98.7%
TestConferenceApprovalVisibility.setUpconfs/tests.py:1316 self.owner = User.objects.create_user("owner", password="pw")390 ms44.1%
UserManager.create_userdjango/contrib/auth/models.py:180390 ms44.1%
UserManager._create_userdjango/contrib/auth/models.py:167387 ms43.8%
UserManager._create_user_objectdjango/contrib/auth/models.py:160387 ms43.8%
make_passworddjango/contrib/auth/hashers.py:118387 ms43.8%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333387 ms43.8%
pbkdf2django/utils/crypto.py:93387 ms43.8%
1 smaller frames hidden
TestConferenceApprovalVisibility.setUpconfs/tests.py:1317 self.other = User.objects.create_user("other", password="pw")378 ms42.7%
UserManager.create_userdjango/contrib/auth/models.py:180378 ms42.7%
UserManager._create_userdjango/contrib/auth/models.py:167376 ms42.5%
UserManager._create_user_objectdjango/contrib/auth/models.py:159376 ms42.5%
make_passworddjango/contrib/auth/hashers.py:118375 ms42.3%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333375 ms42.3%
pbkdf2django/utils/crypto.py:93375 ms42.3%
1 smaller frames hidden
1 smaller frames hidden
TestConferenceApprovalVisibility.test_other_user_does_not_see_pendingconfs/tests.py:1349 response = self.client.get(reverse("conferences"))83 ms9.3%
Client.getdjango/test/client.py:113383 ms9.3%
RequestFactory.getdjango/test/client.py:47583 ms9.3%
RequestFactory.genericdjango/test/client.py:67183 ms9.3%
Client.requestdjango/test/client.py:109183 ms9.3%
ClientHandler.__call__django/test/client.py:18652 ms5.9%
BaseHandler.get_responsedjango/core/handlers/base.py:14252 ms5.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5652 ms5.9%
MiddlewareMixin.__call__django/utils/deprecation.py:38052 ms5.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5652 ms5.9%
MiddlewareMixin.__call__django/utils/deprecation.py:38052 ms5.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5652 ms5.9%
MiddlewareMixin.__call__django/utils/deprecation.py:38052 ms5.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5652 ms5.9%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:12352 ms5.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5652 ms5.9%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:14552 ms5.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5652 ms5.9%
MiddlewareMixin.__call__django/utils/deprecation.py:38052 ms5.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5652 ms5.9%
MiddlewareMixin.__call__django/utils/deprecation.py:38052 ms5.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5652 ms5.9%
MiddlewareMixin.__call__django/utils/deprecation.py:38052 ms5.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5652 ms5.9%
MiddlewareMixin.__call__django/utils/deprecation.py:38052 ms5.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5652 ms5.9%
MiddlewareMixin.__call__django/utils/deprecation.py:38052 ms5.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5652 ms5.9%
MiddlewareMixin.__call__django/utils/deprecation.py:38052 ms5.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5652 ms5.9%
MiddlewareMixin.__call__django/utils/deprecation.py:38052 ms5.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5652 ms5.9%
BaseHandler._get_responsedjango/core/handlers/base.py:19952 ms5.9%
conferencesconfs/views.py:128 return render(47 ms5.3%
renderdjango/shortcuts.py:2747 ms5.3%
render_to_stringdjango/template/loader.py:6246 ms5.1%
Template.renderdjango/template/backends/django.py:10746 ms5.1%
Template.renderdjango/template/base.py:17546 ms5.1%
instrumented_test_renderdjango/test/utils.py:11346 ms5.1%
NodeList.renderdjango/template/base.py:110846 ms5.1%
Node.render_annotateddjango/template/base.py:106946 ms5.1%
ExtendsNode.renderdjango/template/loader_tags.py:16046 ms5.1%
instrumented_test_renderdjango/test/utils.py:11346 ms5.1%
NodeList.renderdjango/template/base.py:110846 ms5.1%
Node.render_annotateddjango/template/base.py:106946 ms5.1%
BlockNode.renderdjango/template/loader_tags.py:6641 ms4.7%
NodeList.renderdjango/template/base.py:110841 ms4.7%
Node.render_annotateddjango/template/base.py:106941 ms4.7%
IfNode.renderdjango/template/defaulttags.py:33219 ms2.2%
QuerySet.__bool__django/db/models/query.py:45319 ms2.2%
QuerySet._fetch_alldjango/db/models/query.py:226212 ms1.3%
ModelIterable.__iter__django/db/models/query.py:10311 ms1.2%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:162511 ms1.2%
CursorWrapper.executedjango/db/backends/utils.py:7911 ms1.2%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:9211 ms1.2%
CursorWrapper._executedjango/db/backends/utils.py:10511 ms1.2%
Cursor.executepsycopg/cursor.py:11311 ms1.2%
Connection.waitpsycopg/connection.py:49511 ms1.2%
BaseCursor._execute_genpsycopg/_cursor_base.py:20611 ms1.2%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:28611 ms1.2%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:7811 ms1.2%
1 smaller frames hidden
QuerySet._fetch_alldjango/db/models/query.py:22647 ms0.8%
QuerySet._prefetch_related_objectsdjango/db/models/query.py:14907 ms0.8%
prefetch_related_objectsdjango/db/models/query.py:27247 ms0.8%
SimpleNode.renderdjango/template/library.py:34318 ms2.0%
heroicon_outlineheroicons/templatetags/heroicons.py:2318 ms2.0%
_render_iconheroicons/templatetags/heroicons.py:4118 ms2.0%
_render_iconheroicons/__init__.py:4718 ms2.0%
_load_iconheroicons/__init__.py:1818 ms2.0%
ZipFile.__init__<stdlib>/zipfile/__init__.py:150518 ms2.0%
2 smaller frames hidden
2 smaller frames hidden
1 smaller frames hidden
3 smaller frames hidden
ClientHandler.__call__django/test/client.py:17328 ms3.1%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6328 ms3.1%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10428 ms3.1%
WhiteNoise.add_fileswhitenoise/base.py:10828 ms3.1%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12020 ms2.3%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:13120 ms2.3%
WhiteNoise.get_static_filewhitenoise/base.py:21711 ms1.2%
StaticFile.__init__whitenoise/responders.py:725 ms0.6%
3 smaller frames hidden
WhiteNoise.get_static_filewhitenoise/base.py:2125 ms0.6%
WhiteNoise.add_cache_headerswhitenoise/base.py:2335 ms0.6%
WhiteNoiseMiddleware.immutable_file_testwhitenoise/middleware.py:1765 ms0.6%
2 smaller frames hidden
WhiteNoise.update_files_dictionarywhitenoise/base.py:1156 ms0.7%
1 smaller frames hidden
TestConferenceApprovalVisibility.test_other_user_does_not_see_pendingconfs/tests.py:1348 self.client.force_login(self.other)13 ms1.4%
ClientMixin.force_logindjango/test/client.py:85813 ms1.4%
ClientMixin._logindjango/test/client.py:88410 ms1.1%
ClientMixin.sessiondjango/test/client.py:81510 ms1.1%
SessionStore.savedjango/contrib/sessions/backends/db.py:12110 ms1.1%
SessionStore.createdjango/contrib/sessions/backends/db.py:707 ms0.8%
SessionBase._get_new_session_keydjango/contrib/sessions/backends/base.py:2017 ms0.8%
SessionStore.existsdjango/contrib/sessions/backends/db.py:637 ms0.8%
QuerySet.existsdjango/db/models/query.py:14586 ms0.7%
Query.has_resultsdjango/db/models/sql/query.py:6876 ms0.7%
SQLCompiler.has_resultsdjango/db/models/sql/compiler.py:15936 ms0.7%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16256 ms0.7%
CursorWrapper.executedjango/db/backends/utils.py:796 ms0.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:926 ms0.7%
CursorWrapper._executedjango/db/backends/utils.py:1056 ms0.7%
Cursor.executepsycopg/cursor.py:1136 ms0.7%
Connection.waitpsycopg/connection.py:4956 ms0.7%
1 smaller frames hidden
1 smaller frames hidden
2 smaller frames hidden
3 smaller frames hidden
Estimated from 835 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
390 ms
confs/tests.py:1317
self.other = User.objects.create_user("other", password="pw")
TestConferenceApprovalVisibility.setUp · Password hashing
378 ms
confs/views.py:128
return render(
conferences · Templates
47 ms
confs/tests.py:1349
response = self.client.get(reverse("conferences"))
TestConferenceApprovalVisibility.test_other_user_does_not_see_pending · Libraries
31 ms
confs/tests.py:1348
self.client.force_login(self.other)
TestConferenceApprovalVisibility.test_other_user_does_not_see_pending · Database
13 ms
confs/tests.py:1318
self.approved = baker.make(
TestConferenceApprovalVisibility.setUp · Database
3 ms
confs/tests.py:1326
self.pending = baker.make(
TestConferenceApprovalVisibility.setUp · Database
3 ms
confs/views.py:41
for al in ConferenceLookup.objects.values("language").annotate(count=Count("language")).order_by("-count")
conferences · Database
2 ms
confs/views.py:85
if request.user.is_authenticated:
conferences · Database
2 ms
confs/views.py:107
.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 10 ms
_django_setup_unittest class 0.74 ms
_django_set_urlconf function 0.13 ms
_template_string_if_invalid_marker function 0.05 ms
_django_db_marker function 0.04 ms
_dj_autoclear_mailbox function 0.04 ms
_live_server_helper function 0.04 ms
_django_isolate_apps function 0.04 ms
_django_clear_site_cache function 0.03 ms
monkeypatch function 0.02 ms

Database

35 queries · 38 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:1316
775 ms
call test body
confs/tests.py:1349
95 ms
setup setUpClass
django/test/testcases.py:1426
10 ms
call _post_teardown
django/test/testcases.py:1243
2 ms
setup 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 885 ms d923a46 main Profile
7 hours ago CI github-actions:test passed 1.72 s 82997f8 main Profile
7 hours ago CI github-actions:test passed 2.23 s 623aa3e main Profile
12 hours ago CI github-actions:test passed 2.29 s ab6465a main Profile
12 hours ago CI github-actions:test passed 1.00 s 0c23747 main Run