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

TestEditConference::test_owner_sees_edit_button_on_approved_detail

First seen 12 hours ago in 0c23747
CI github-actions:test 4 runs
Average
1.88 s
median 1.80 s
max 3.15 s
Phases
Setup 4 ms Call 1.88 s Teardown 0.33 ms
Categories
Password hashing 1.71 s Database 46 ms App code 0.55 ms Factories 0.20 ms Other (Libraries, pytest, Templates, Unsampled) 121 ms

33 database queries per run

Needs 88 KB of memory (max 352 KB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, 7 hours ago · open run
Show pytest frames
call778 ms99.9%
TestEditConference.setUpconfs/tests.py:1175 self.owner = User.objects.create_user("owner", password="pw")252 ms32.4%
UserManager.create_userdjango/contrib/auth/models.py:180252 ms32.4%
UserManager._create_userdjango/contrib/auth/models.py:167251 ms32.2%
UserManager._create_user_objectdjango/contrib/auth/models.py:160251 ms32.2%
make_passworddjango/contrib/auth/hashers.py:118251 ms32.2%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333251 ms32.2%
pbkdf2django/utils/crypto.py:93251 ms32.2%
1 smaller frames hidden
TestEditConference.setUpconfs/tests.py:1176 self.other = User.objects.create_user("other", password="pw")249 ms32.0%
UserManager.create_userdjango/contrib/auth/models.py:180249 ms32.0%
UserManager._create_userdjango/contrib/auth/models.py:167248 ms31.8%
UserManager._create_user_objectdjango/contrib/auth/models.py:160248 ms31.8%
make_passworddjango/contrib/auth/hashers.py:118248 ms31.8%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333248 ms31.8%
pbkdf2django/utils/crypto.py:93248 ms31.8%
1 smaller frames hidden
TestEditConference.setUpconfs/tests.py:1177 self.staff = User.objects.create_user("staff", password="pw", is_staff=True)246 ms31.6%
UserManager.create_userdjango/contrib/auth/models.py:180246 ms31.6%
UserManager._create_userdjango/contrib/auth/models.py:167245 ms31.4%
UserManager._create_user_objectdjango/contrib/auth/models.py:160245 ms31.4%
make_passworddjango/contrib/auth/hashers.py:118245 ms31.4%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333245 ms31.4%
pbkdf2django/utils/crypto.py:93245 ms31.4%
1 smaller frames hidden
TestEditConference.test_owner_sees_edit_button_on_approved_detailconfs/tests.py:1264 response = self.client.get(reverse("conference", kwargs={"conference_slug": self.conference.slug}))23 ms3.0%
Client.getdjango/test/client.py:113323 ms3.0%
RequestFactory.getdjango/test/client.py:47523 ms3.0%
RequestFactory.genericdjango/test/client.py:67123 ms3.0%
Client.requestdjango/test/client.py:109123 ms3.0%
ClientHandler.__call__django/test/client.py:18613 ms1.6%
BaseHandler.get_responsedjango/core/handlers/base.py:14213 ms1.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5613 ms1.6%
MiddlewareMixin.__call__django/utils/deprecation.py:38013 ms1.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5613 ms1.6%
MiddlewareMixin.__call__django/utils/deprecation.py:38013 ms1.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5613 ms1.6%
MiddlewareMixin.__call__django/utils/deprecation.py:38013 ms1.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5613 ms1.6%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:12313 ms1.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5613 ms1.6%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:14513 ms1.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5613 ms1.6%
MiddlewareMixin.__call__django/utils/deprecation.py:38013 ms1.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5613 ms1.6%
MiddlewareMixin.__call__django/utils/deprecation.py:38013 ms1.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5613 ms1.6%
MiddlewareMixin.__call__django/utils/deprecation.py:38013 ms1.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5613 ms1.6%
MiddlewareMixin.__call__django/utils/deprecation.py:38013 ms1.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5613 ms1.6%
MiddlewareMixin.__call__django/utils/deprecation.py:38013 ms1.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5613 ms1.6%
MiddlewareMixin.__call__django/utils/deprecation.py:38013 ms1.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5613 ms1.6%
MiddlewareMixin.__call__django/utils/deprecation.py:38013 ms1.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5613 ms1.6%
BaseHandler._get_responsedjango/core/handlers/base.py:19913 ms1.6%
conferenceconfs/views.py:16811 ms1.5%
_conference_detailconfs/views.py:268 page_obj = paginator.get_page(page_number)4 ms0.5%
Paginator.get_pagedjango/core/paginator.py:1614 ms0.5%
Paginator.validate_numberdjango/core/paginator.py:1534 ms0.5%
cached_property.__get__django/utils/functional.py:474 ms0.5%
Paginator.num_pagesdjango/core/paginator.py:1884 ms0.5%
cached_property.__get__django/utils/functional.py:474 ms0.5%
Paginator.countdjango/core/paginator.py:1824 ms0.5%
QuerySet.countdjango/db/models/query.py:6774 ms0.5%
Query.get_countdjango/db/models/sql/query.py:6574 ms0.5%
Query.get_aggregationdjango/db/models/sql/query.py:6394 ms0.5%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16254 ms0.5%
CursorWrapper.executedjango/db/backends/utils.py:794 ms0.5%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:924 ms0.5%
CursorWrapper._executedjango/db/backends/utils.py:1054 ms0.5%
Cursor.executepsycopg/cursor.py:1134 ms0.5%
Connection.waitpsycopg/connection.py:4954 ms0.5%
4 smaller frames hidden
1 smaller frames hidden
ClientHandler.__call__django/test/client.py:17310 ms1.3%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6310 ms1.3%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:1049 ms1.2%
WhiteNoise.add_fileswhitenoise/base.py:1089 ms1.2%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1205 ms0.7%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:1315 ms0.7%
WhiteNoise.get_static_filewhitenoise/base.py:2174 ms0.5%
1 smaller frames hidden
WhiteNoise.update_files_dictionarywhitenoise/base.py:1154 ms0.5%
1 smaller frames hidden
TestEditConference.test_owner_sees_edit_button_on_approved_detailconfs/tests.py:1263 self.client.force_login(self.owner)5 ms0.7%
ClientMixin.force_logindjango/test/client.py:8585 ms0.7%
3 smaller frames hidden
Estimated from 744 samples; phase durations are exact. Frames from pytest and pluggy are hidden .

Hot lines in your code

confs/tests.py:1175
self.owner = User.objects.create_user("owner", password="pw")
TestEditConference.setUp · Password hashing
252 ms
confs/tests.py:1176
self.other = User.objects.create_user("other", password="pw")
TestEditConference.setUp · Password hashing
249 ms
confs/tests.py:1177
self.staff = User.objects.create_user("staff", password="pw", is_staff=True)
TestEditConference.setUp · Password hashing
246 ms
confs/tests.py:1264
response = self.client.get(reverse("conference", kwargs={"conference_slug": self.conference.slug}))
TestEditConference.test_owner_sees_edit_button_on_approved_detail · Libraries
10 ms
confs/tests.py:1263
self.client.force_login(self.owner)
TestEditConference.test_owner_sees_edit_button_on_approved_detail · Database
5 ms
confs/views.py:268
page_obj = paginator.get_page(page_number)
_conference_detail · Database
4 ms
confs/views.py:204
.count()
_conference_detail · Database
2 ms
confs/views.py:226
counts_dict = {c["created_at_date"].date(): c["count"] for c in counts}
_conference_detail · Database
2 ms
confs/views.py:276
current_account = next((account for account in account_counts if account.account.id == account_id), None)
_conference_detail.<locals>.<genexpr> · Database
2 ms
confs/tests.py:1178
self.conference = baker.make(
TestEditConference.setUp · Database
1 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.02 ms
_django_isolate_apps function 0.02 ms
_django_clear_site_cache function 0.02 ms
_live_server_helper function 0.02 ms
_django_set_urlconf function 0.02 ms
monkeypatch function 0.01 ms

Database

33 queries · 19 ms

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

3×
INSERT INTO "auth_user" ("password", "last_login", "is_superuser", "username", "first_name", "last_name", "email", "is_staff", "is_active", "date_joined") VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s) RETURNING "auth_user"."id"

Biggest pieces of work

call setUp
confs/tests.py:1175
747 ms
call test body
confs/tests.py:1264
29 ms
call _pre_setup
django/test/testcases.py:1167
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 778 ms d923a46 main Profile
7 hours ago CI github-actions:test passed 3.15 s 82997f8 main Profile
7 hours ago CI github-actions:test passed 981 ms 623aa3e main Profile
12 hours ago CI github-actions:test passed 2.62 s ab6465a main Profile
12 hours ago CI github-actions:test passed 1.37 s 0c23747 main Run