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

TestEditConference::test_edit_does_not_change_slug

First seen 3 weeks ago in 0c23747
CI github-actions:test 11 runs
Average
1.86 s
median 1.62 s
max 3.14 s
Phases
Setup 19 ms Call 1.84 s Teardown 0.33 ms
Categories
Password hashing 1.71 s Database 70 ms Factories 0.75 ms Other (Libraries, pytest, Deep copies, Unsampled) 80 ms

31 database queries per run

Needs 8 KB of memory (max 64 KB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, 7 hours ago · open run
Show pytest frames
setup22 ms1.2%
TestCase.setUpClassdjango/test/testcases.py:1426 cls.cls_atomics = cls._enter_atomics()21 ms1.2%
TestCase._enter_atomicsdjango/test/testcases.py:139921 ms1.2%
Atomic.__enter__django/db/transaction.py:21021 ms1.2%
BaseDatabaseWrapper.get_autocommitdjango/db/backends/base/base.py:45421 ms1.2%
SimpleTestCase.ensure_connection_patch_method.<locals>.patched_ensure_connectiondjango/test/testcases.py:30421 ms1.2%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2621 ms1.2%
BaseDatabaseWrapper.ensure_connectiondjango/db/backends/base/base.py:27921 ms1.2%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2621 ms1.2%
BaseDatabaseWrapper.connectdjango/db/backends/base/base.py:25621 ms1.2%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2621 ms1.2%
DatabaseWrapper.get_new_connectiondjango/db/backends/postgresql/base.py:34521 ms1.2%
Connection.connectpsycopg/connection.py:10921 ms1.2%
wait_connpsycopg/waiting.py:14513 ms0.7%
BaseConnection._connect_genpsycopg/_connection_base.py:43913 ms0.7%
3 smaller frames hidden
call1.76 s98.7%
TestEditConference.setUpconfs/tests.py:1177 self.staff = User.objects.create_user("staff", password="pw", is_staff=True)672 ms37.8%
UserManager.create_userdjango/contrib/auth/models.py:180672 ms37.8%
UserManager._create_userdjango/contrib/auth/models.py:167671 ms37.7%
UserManager._create_user_objectdjango/contrib/auth/models.py:160671 ms37.7%
make_passworddjango/contrib/auth/hashers.py:118671 ms37.7%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333671 ms37.7%
pbkdf2django/utils/crypto.py:93671 ms37.7%
1 smaller frames hidden
TestEditConference.setUpconfs/tests.py:1176 self.other = User.objects.create_user("other", password="pw")491 ms27.6%
UserManager.create_userdjango/contrib/auth/models.py:180491 ms27.6%
UserManager._create_userdjango/contrib/auth/models.py:167491 ms27.6%
UserManager._create_user_objectdjango/contrib/auth/models.py:160491 ms27.6%
make_passworddjango/contrib/auth/hashers.py:118491 ms27.6%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333491 ms27.6%
pbkdf2django/utils/crypto.py:93491 ms27.6%
TestEditConference.setUpconfs/tests.py:1175 self.owner = User.objects.create_user("owner", password="pw")490 ms27.6%
UserManager.create_userdjango/contrib/auth/models.py:180490 ms27.6%
UserManager._create_userdjango/contrib/auth/models.py:167486 ms27.3%
UserManager._create_user_objectdjango/contrib/auth/models.py:160486 ms27.3%
make_passworddjango/contrib/auth/hashers.py:118486 ms27.3%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333486 ms27.3%
pbkdf2django/utils/crypto.py:93486 ms27.3%
1 smaller frames hidden
TestEditConference.test_edit_does_not_change_slugconfs/tests.py:1286 self.client.post(self.url, self._post_data(name="A Totally Different Name"))72 ms4.1%
Client.postdjango/test/client.py:116272 ms4.1%
RequestFactory.postdjango/test/client.py:49972 ms4.1%
RequestFactory.genericdjango/test/client.py:67172 ms4.1%
Client.requestdjango/test/client.py:109172 ms4.1%
ClientHandler.__call__django/test/client.py:18650 ms2.8%
BaseHandler.get_responsedjango/core/handlers/base.py:14250 ms2.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5650 ms2.8%
MiddlewareMixin.__call__django/utils/deprecation.py:38050 ms2.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5650 ms2.8%
MiddlewareMixin.__call__django/utils/deprecation.py:38050 ms2.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5650 ms2.8%
MiddlewareMixin.__call__django/utils/deprecation.py:38050 ms2.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5650 ms2.8%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:12350 ms2.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5650 ms2.8%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:14550 ms2.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5650 ms2.8%
MiddlewareMixin.__call__django/utils/deprecation.py:38050 ms2.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5650 ms2.8%
MiddlewareMixin.__call__django/utils/deprecation.py:38050 ms2.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5650 ms2.8%
MiddlewareMixin.__call__django/utils/deprecation.py:38050 ms2.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5650 ms2.8%
MiddlewareMixin.__call__django/utils/deprecation.py:38050 ms2.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5650 ms2.8%
MiddlewareMixin.__call__django/utils/deprecation.py:38050 ms2.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5650 ms2.8%
MiddlewareMixin.__call__django/utils/deprecation.py:38050 ms2.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5650 ms2.8%
MiddlewareMixin.__call__django/utils/deprecation.py:38050 ms2.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5650 ms2.8%
BaseHandler._get_responsedjango/core/handlers/base.py:19950 ms2.8%
user_passes_test.<locals>.decorator.<locals>._view_wrapperdjango/contrib/auth/decorators.py:6250 ms2.8%
edit_conferenceconfs/views.py:543 form.save()39 ms2.2%
BaseModelForm.savedjango/forms/models.py:57438 ms2.1%
Model.savedjango/db/models/base.py:90438 ms2.1%
Model.save_basedjango/db/models/base.py:99638 ms2.1%
Model._save_tabledjango/db/models/base.py:114038 ms2.1%
Model._do_updatedjango/db/models/base.py:124438 ms2.1%
QuerySet._updatedjango/db/models/query.py:144838 ms2.1%
SQLUpdateCompiler.execute_returning_sqldjango/db/models/sql/compiler.py:215038 ms2.1%
SQLUpdateCompiler.execute_sqldjango/db/models/sql/compiler.py:212138 ms2.1%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:162537 ms2.1%
CursorWrapper.executedjango/db/backends/utils.py:7937 ms2.1%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:9237 ms2.1%
CursorWrapper._executedjango/db/backends/utils.py:10537 ms2.1%
Cursor.executepsycopg/cursor.py:11337 ms2.1%
Connection.waitpsycopg/connection.py:49537 ms2.1%
1 smaller frames hidden
1 smaller frames hidden
2 smaller frames hidden
ClientHandler.__call__django/test/client.py:17322 ms1.3%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6322 ms1.3%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10421 ms1.2%
WhiteNoise.add_fileswhitenoise/base.py:10821 ms1.2%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12016 ms0.9%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:13116 ms0.9%
WhiteNoise.get_static_filewhitenoise/base.py:21711 ms0.6%
1 smaller frames hidden
1 smaller frames hidden
1 smaller frames hidden
TestEditConference.test_edit_does_not_change_slugconfs/tests.py:1285 self.client.force_login(self.owner)16 ms0.9%
ClientMixin.force_logindjango/test/client.py:85816 ms0.9%
4 smaller frames hidden
Estimated from 1,743 samples; phase durations are exact. Frames from pytest and pluggy are hidden .

Hot lines in your code

confs/tests.py:1177
self.staff = User.objects.create_user("staff", password="pw", is_staff=True)
TestEditConference.setUp · Password hashing
672 ms
confs/tests.py:1176
self.other = User.objects.create_user("other", password="pw")
TestEditConference.setUp · Password hashing
491 ms
confs/tests.py:1175
self.owner = User.objects.create_user("owner", password="pw")
TestEditConference.setUp · Password hashing
490 ms
confs/views.py:543
form.save()
edit_conference · Database
39 ms
confs/tests.py:1286
self.client.post(self.url, self._post_data(name="A Totally Different Name"))
TestEditConference.test_edit_does_not_change_slug · Libraries
22 ms
confs/tests.py:1285
self.client.force_login(self.owner)
TestEditConference.test_edit_does_not_change_slug · Database
16 ms
confs/views.py:542
if form.is_valid():
edit_conference · Libraries
6 ms
confs/tests.py:1178
self.conference = baker.make(
TestEditConference.setUp · Database
4 ms
confs/views.py:420
super().__init__(*args, **kwargs)
ConferenceForm.__init__ · Deep copies
4 ms
confs/tests.py:1287
self.conference.refresh_from_db()
TestEditConference.test_edit_does_not_change_slug · Database
3 ms

Fixtures

Exact setup time
_unittest_setUpClass_fixture_TestEditConference class 20 ms
_django_setup_unittest class 0.49 ms
_django_set_urlconf function 0.13 ms
_live_server_helper function 0.08 ms
_dj_autoclear_mailbox function 0.07 ms
_django_db_marker function 0.07 ms
_template_string_if_invalid_marker function 0.06 ms
_django_isolate_apps function 0.06 ms
_django_clear_site_cache function 0.05 ms
monkeypatch function 0.03 ms

Database

31 queries · 37 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:1177
1.66 s
call test body
confs/tests.py:1286
92 ms
setup setUpClass
django/test/testcases.py:1426
21 ms
call _post_teardown
django/test/testcases.py:1243
4 ms
call _pre_setup
django/test/testcases.py:1167
2 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 1.78 s c28a326 main Profile
16 hours ago CI github-actions:test passed 1.01 s 9b8826a main Profile
22 hours ago CI github-actions:test passed 1.47 s 4f01055 main Profile
1 week, 5 days ago CI github-actions:test passed 1.94 s 8ab642e main Profile
2 weeks, 2 days ago CI github-actions:test passed 1.52 s 9b75244 main Profile
2 weeks, 2 days ago CI github-actions:test passed 1.62 s 9603516 main Profile
2 weeks, 4 days ago CI github-actions:test passed 1.47 s 615a272 main Profile
2 weeks, 6 days ago CI github-actions:test passed 1.15 s d923a46 main Profile
3 weeks ago CI github-actions:test passed 2.50 s 82997f8 main Profile
3 weeks ago CI github-actions:test passed 3.14 s 623aa3e main Profile
3 weeks ago CI github-actions:test passed 2.86 s ab6465a main Profile
3 weeks ago CI github-actions:test passed 1.47 s 0c23747 main Run