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

TestEditConference::test_owner_can_edit

First seen 13 hours ago in 0c23747
CI github-actions:test 4 runs
Average
2.12 s
median 1.97 s
max 3.46 s
Phases
Setup 2 ms Call 2.12 s Teardown 0.38 ms
Categories
Password hashing 1.99 s Database 30 ms Factories 0.93 ms Other (Libraries, Deep copies, pytest, Unsampled) 98 ms

31 database queries per run

Needs 2 KB of memory (max 8 KB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, 7 hours ago · open run
Show pytest frames
call1.11 s99.9%
TestEditConference.setUpconfs/tests.py:1176 self.other = User.objects.create_user("other", password="pw")371 ms33.5%
UserManager.create_userdjango/contrib/auth/models.py:180371 ms33.5%
UserManager._create_userdjango/contrib/auth/models.py:167369 ms33.3%
UserManager._create_user_objectdjango/contrib/auth/models.py:160369 ms33.3%
make_passworddjango/contrib/auth/hashers.py:118369 ms33.3%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333369 ms33.3%
pbkdf2django/utils/crypto.py:93369 ms33.3%
1 smaller frames hidden
TestEditConference.setUpconfs/tests.py:1177 self.staff = User.objects.create_user("staff", password="pw", is_staff=True)343 ms31.0%
UserManager.create_userdjango/contrib/auth/models.py:180343 ms31.0%
UserManager._create_userdjango/contrib/auth/models.py:167342 ms30.9%
UserManager._create_user_objectdjango/contrib/auth/models.py:160342 ms30.9%
make_passworddjango/contrib/auth/hashers.py:118342 ms30.9%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333342 ms30.9%
pbkdf2django/utils/crypto.py:93342 ms30.9%
1 smaller frames hidden
TestEditConference.setUpconfs/tests.py:1175 self.owner = User.objects.create_user("owner", password="pw")334 ms30.1%
UserManager.create_userdjango/contrib/auth/models.py:180334 ms30.1%
UserManager._create_userdjango/contrib/auth/models.py:167333 ms30.0%
UserManager._create_user_objectdjango/contrib/auth/models.py:160333 ms30.0%
make_passworddjango/contrib/auth/hashers.py:118333 ms30.0%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333333 ms30.0%
pbkdf2django/utils/crypto.py:93333 ms30.0%
1 smaller frames hidden
TestEditConference.test_owner_can_editconfs/tests.py:1219 response = self.client.post(self.url, self._post_data())48 ms4.3%
Client.postdjango/test/client.py:116248 ms4.3%
RequestFactory.postdjango/test/client.py:49948 ms4.3%
RequestFactory.genericdjango/test/client.py:67148 ms4.3%
Client.requestdjango/test/client.py:109148 ms4.3%
ClientHandler.__call__django/test/client.py:17331 ms2.8%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6331 ms2.8%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10430 ms2.7%
WhiteNoise.add_fileswhitenoise/base.py:10830 ms2.7%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12023 ms2.1%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:13121 ms1.9%
WhiteNoise.get_static_filewhitenoise/base.py:21716 ms1.4%
2 smaller frames hidden
WhiteNoise.update_files_dictionarywhitenoise/base.py:1156 ms0.6%
1 smaller frames hidden
1 smaller frames hidden
ClientHandler.__call__django/test/client.py:18617 ms1.5%
BaseHandler.get_responsedjango/core/handlers/base.py:14217 ms1.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5617 ms1.5%
MiddlewareMixin.__call__django/utils/deprecation.py:38017 ms1.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5617 ms1.5%
MiddlewareMixin.__call__django/utils/deprecation.py:38017 ms1.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5617 ms1.5%
MiddlewareMixin.__call__django/utils/deprecation.py:38017 ms1.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5617 ms1.5%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:12317 ms1.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5617 ms1.5%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:14517 ms1.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5617 ms1.5%
MiddlewareMixin.__call__django/utils/deprecation.py:38017 ms1.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5617 ms1.5%
MiddlewareMixin.__call__django/utils/deprecation.py:38017 ms1.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5617 ms1.5%
MiddlewareMixin.__call__django/utils/deprecation.py:38013 ms1.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5613 ms1.2%
MiddlewareMixin.__call__django/utils/deprecation.py:38013 ms1.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5613 ms1.2%
MiddlewareMixin.__call__django/utils/deprecation.py:38013 ms1.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5613 ms1.2%
MiddlewareMixin.__call__django/utils/deprecation.py:38013 ms1.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5613 ms1.2%
MiddlewareMixin.__call__django/utils/deprecation.py:38013 ms1.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5613 ms1.2%
BaseHandler._get_responsedjango/core/handlers/base.py:19913 ms1.2%
user_passes_test.<locals>.decorator.<locals>._view_wrapperdjango/contrib/auth/decorators.py:6210 ms0.9%
edit_conferenceconfs/views.py:5417 ms0.7%
ConferenceForm.__init__confs/views.py:420 super().__init__(*args, **kwargs)7 ms0.7%
2 smaller frames hidden
1 smaller frames hidden
TestEditConference.test_owner_can_editconfs/tests.py:1218 self.client.force_login(self.owner)6 ms0.6%
ClientMixin.force_logindjango/test/client.py:8586 ms0.6%
4 smaller frames hidden
Estimated from 1,071 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
371 ms
confs/tests.py:1177
self.staff = User.objects.create_user("staff", password="pw", is_staff=True)
TestEditConference.setUp · Password hashing
343 ms
confs/tests.py:1175
self.owner = User.objects.create_user("owner", password="pw")
TestEditConference.setUp · Password hashing
334 ms
confs/tests.py:1219
response = self.client.post(self.url, self._post_data())
TestEditConference.test_owner_can_edit · Libraries
37 ms
confs/views.py:420
super().__init__(*args, **kwargs)
ConferenceForm.__init__ · Deep copies
7 ms
confs/tests.py:1218
self.client.force_login(self.owner)
TestEditConference.test_owner_can_edit · Database
6 ms
confs/tests.py:1178
self.conference = baker.make(
TestEditConference.setUp · Factories
2 ms
confs/views.py:536
conference = get_object_or_404(Conference, slug=conference_slug)
edit_conference · Database
2 ms
confs/views.py:543
form.save()
edit_conference · Database
1 ms
confs/tests.py:1220
self.conference.refresh_from_db()
TestEditConference.test_owner_can_edit · Database
1 ms

Fixtures

Exact setup time
_dj_autoclear_mailbox function 0.05 ms
_template_string_if_invalid_marker function 0.04 ms
_django_db_marker function 0.04 ms
_django_isolate_apps function 0.03 ms
_live_server_helper function 0.03 ms
_django_set_urlconf function 0.03 ms
_django_clear_site_cache function 0.03 ms
monkeypatch function 0.02 ms

Database

31 queries · 14 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
1.05 s
call test body
confs/tests.py:1219
55 ms
call _pre_setup
django/test/testcases.py:1167
1 ms
call _post_teardown
django/test/testcases.py:1243
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 1.11 s d923a46 main Profile
7 hours ago CI github-actions:test passed 2.08 s 82997f8 main Profile
7 hours ago CI github-actions:test passed 3.46 s 623aa3e main Profile
12 hours ago CI github-actions:test passed 1.85 s ab6465a main Profile
13 hours ago CI github-actions:test passed 1.34 s 0c23747 main Run