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

TestEditConference::test_owner_sees_edit_button_on_approved_detail

First seen 3 weeks ago in 0c23747
CI github-actions:test 11 runs
Average
1.33 s
median 959 ms
max 3.15 s
Phases
Setup 2 ms Call 1.32 s Teardown 0.29 ms
Categories
Password hashing 1.22 s Database 39 ms App code 0.48 ms Test code 0.18 ms Factories 0.16 ms Other (Libraries, Templates, pytest, Unsampled) 61 ms

33 database queries per run

Needs 161 KB of memory (max 464 KB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, 7 hours ago · open run
Show pytest frames
call956 ms99.9%
TestEditConference.setUpconfs/tests.py:1176 self.other = User.objects.create_user("other", password="pw")304 ms31.8%
UserManager.create_userdjango/contrib/auth/models.py:180304 ms31.8%
UserManager._create_userdjango/contrib/auth/models.py:167303 ms31.7%
UserManager._create_user_objectdjango/contrib/auth/models.py:160303 ms31.7%
make_passworddjango/contrib/auth/hashers.py:118303 ms31.7%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333303 ms31.7%
pbkdf2django/utils/crypto.py:93303 ms31.7%
1 smaller frames hidden
TestEditConference.setUpconfs/tests.py:1175 self.owner = User.objects.create_user("owner", password="pw")301 ms31.5%
UserManager.create_userdjango/contrib/auth/models.py:180301 ms31.5%
UserManager._create_userdjango/contrib/auth/models.py:167300 ms31.3%
UserManager._create_user_objectdjango/contrib/auth/models.py:160300 ms31.3%
make_passworddjango/contrib/auth/hashers.py:118300 ms31.3%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333300 ms31.3%
pbkdf2django/utils/crypto.py:93300 ms31.3%
1 smaller frames hidden
TestEditConference.setUpconfs/tests.py:1177 self.staff = User.objects.create_user("staff", password="pw", is_staff=True)298 ms31.1%
UserManager.create_userdjango/contrib/auth/models.py:180298 ms31.1%
UserManager._create_userdjango/contrib/auth/models.py:167297 ms31.0%
UserManager._create_user_objectdjango/contrib/auth/models.py:160297 ms31.0%
make_passworddjango/contrib/auth/hashers.py:118297 ms31.0%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333297 ms31.0%
pbkdf2django/utils/crypto.py:93297 ms31.0%
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}))46 ms4.8%
Client.getdjango/test/client.py:113346 ms4.8%
RequestFactory.getdjango/test/client.py:47546 ms4.8%
RequestFactory.genericdjango/test/client.py:67146 ms4.8%
Client.requestdjango/test/client.py:109146 ms4.8%
ClientHandler.__call__django/test/client.py:18637 ms3.9%
BaseHandler.get_responsedjango/core/handlers/base.py:14237 ms3.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5637 ms3.9%
MiddlewareMixin.__call__django/utils/deprecation.py:38037 ms3.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5637 ms3.9%
MiddlewareMixin.__call__django/utils/deprecation.py:38037 ms3.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5637 ms3.9%
MiddlewareMixin.__call__django/utils/deprecation.py:38037 ms3.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5637 ms3.9%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:12337 ms3.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5637 ms3.9%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:14537 ms3.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5637 ms3.9%
MiddlewareMixin.__call__django/utils/deprecation.py:38037 ms3.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5637 ms3.9%
MiddlewareMixin.__call__django/utils/deprecation.py:38037 ms3.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5637 ms3.9%
MiddlewareMixin.__call__django/utils/deprecation.py:38037 ms3.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5637 ms3.9%
MiddlewareMixin.__call__django/utils/deprecation.py:38037 ms3.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5637 ms3.9%
MiddlewareMixin.__call__django/utils/deprecation.py:38037 ms3.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5637 ms3.9%
MiddlewareMixin.__call__django/utils/deprecation.py:38037 ms3.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5637 ms3.9%
MiddlewareMixin.__call__django/utils/deprecation.py:38037 ms3.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5637 ms3.9%
BaseHandler._get_responsedjango/core/handlers/base.py:19937 ms3.9%
conferenceconfs/views.py:16837 ms3.9%
_conference_detailconfs/views.py:226 counts_dict = {c["created_at_date"].date(): c["count"] for c in counts}23 ms2.4%
QuerySet.__iter__django/db/models/query.py:43923 ms2.4%
QuerySet._fetch_alldjango/db/models/query.py:226223 ms2.4%
ValuesIterable.__iter__django/db/models/query.py:24723 ms2.4%
SQLCompiler.results_iterdjango/db/models/sql/compiler.py:157423 ms2.4%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:162523 ms2.4%
CursorWrapper.executedjango/db/backends/utils.py:7923 ms2.4%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:9223 ms2.4%
CursorWrapper._executedjango/db/backends/utils.py:10523 ms2.4%
Cursor.executepsycopg/cursor.py:11323 ms2.4%
Connection.waitpsycopg/connection.py:49523 ms2.4%
_conference_detailconfs/views.py:268 page_obj = paginator.get_page(page_number)5 ms0.5%
Paginator.get_pagedjango/core/paginator.py:1615 ms0.5%
Paginator.validate_numberdjango/core/paginator.py:1535 ms0.5%
cached_property.__get__django/utils/functional.py:475 ms0.5%
Paginator.num_pagesdjango/core/paginator.py:1885 ms0.5%
cached_property.__get__django/utils/functional.py:475 ms0.5%
Paginator.countdjango/core/paginator.py:1825 ms0.5%
QuerySet.countdjango/db/models/query.py:6775 ms0.5%
Query.get_countdjango/db/models/sql/query.py:6575 ms0.5%
Query.get_aggregationdjango/db/models/sql/query.py:6395 ms0.5%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16255 ms0.5%
CursorWrapper.executedjango/db/backends/utils.py:795 ms0.5%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:925 ms0.5%
CursorWrapper._executedjango/db/backends/utils.py:1055 ms0.5%
Cursor.executepsycopg/cursor.py:1135 ms0.5%
Connection.waitpsycopg/connection.py:4955 ms0.5%
6 smaller frames hidden
ClientHandler.__call__django/test/client.py:1738 ms0.9%
BaseHandler.load_middlewaredjango/core/handlers/base.py:638 ms0.9%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:1048 ms0.9%
WhiteNoise.add_fileswhitenoise/base.py:1088 ms0.9%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1205 ms0.5%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:1315 ms0.5%
WhiteNoise.get_static_filewhitenoise/base.py:2175 ms0.5%
1 smaller frames hidden
5 smaller frames hidden
Estimated from 921 samples; phase durations are exact. Frames from pytest and pluggy are hidden .

Hot lines in your code

confs/tests.py:1176
self.other = User.objects.create_user("other", password="pw")
TestEditConference.setUp · Password hashing
304 ms
confs/tests.py:1175
self.owner = User.objects.create_user("owner", password="pw")
TestEditConference.setUp · Password hashing
301 ms
confs/tests.py:1177
self.staff = User.objects.create_user("staff", password="pw", is_staff=True)
TestEditConference.setUp · Password hashing
298 ms
confs/views.py:226
counts_dict = {c["created_at_date"].date(): c["count"] for c in counts}
_conference_detail · Database
23 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
8 ms
confs/views.py:268
page_obj = paginator.get_page(page_number)
_conference_detail · Database
5 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
3 ms
confs/tests.py:1263
self.client.force_login(self.owner)
TestEditConference.test_owner_sees_edit_button_on_approved_detail · Database
3 ms
confs/views.py:296
return render(
_conference_detail · Templates
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.04 ms
_django_db_marker function 0.03 ms
_django_isolate_apps function 0.03 ms
_django_set_urlconf function 0.03 ms
_live_server_helper function 0.03 ms
_django_clear_site_cache function 0.02 ms
monkeypatch function 0.02 ms

Database

33 queries · 21 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:1176
904 ms
call test body
confs/tests.py:1264
50 ms
call _pre_setup
django/test/testcases.py:1167
1 ms
call _post_teardown
django/test/testcases.py:1243
1 ms

Reliability

12 results · 0 CI failures · 0 local failures

This test hasn't failed recently.

History

Latest 12 results, oldest first in the strip
When Environment Outcome Duration Commit
7 hours ago CI github-actions:test passed 957 ms c28a326 main Profile
16 hours ago CI github-actions:test passed 632 ms 9b8826a main Profile
22 hours ago CI github-actions:test passed 959 ms 4f01055 main Profile
1 week, 5 days ago CI github-actions:test passed 940 ms 8ab642e main Profile
2 weeks, 2 days ago CI github-actions:test passed 1.23 s 9b75244 main Profile
2 weeks, 2 days ago CI github-actions:test passed 952 ms 9603516 main Profile
2 weeks, 4 days ago CI github-actions:test passed 1.38 s 615a272 main Profile
3 weeks ago CI github-actions:test passed 778 ms d923a46 main Profile
3 weeks ago CI github-actions:test passed 3.15 s 82997f8 main Profile
3 weeks ago CI github-actions:test passed 981 ms 623aa3e main Profile
3 weeks ago CI github-actions:test passed 2.62 s ab6465a main Profile
3 weeks ago CI github-actions:test passed 1.37 s 0c23747 main Run