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

TestCreateConference::test_selected_icons_are_saved

First seen 3 weeks ago in 0c23747
CI github-actions:test 11 runs
Average
699 ms
median 558 ms
max 1.29 s
Phases
Setup 3 ms Call 695 ms Teardown 1 ms
Categories
Password hashing 590 ms Database 25 ms Test code 0.24 ms App code 0.09 ms Other (Libraries, pytest, Deep copies, Mocking, ...) 83 ms

31 database queries per run

Needs 0 KB of memory (max 0 KB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, 7 hours ago · open run
Show pytest frames
setup2 ms0.4%
call556 ms99.6%
TestCreateConference.setUpconfs/tests.py:1044 self.user = User.objects.create_user("alice", password="pw")453 ms81.0%
UserManager.create_userdjango/contrib/auth/models.py:180453 ms81.0%
UserManager._create_userdjango/contrib/auth/models.py:167451 ms80.7%
UserManager._create_user_objectdjango/contrib/auth/models.py:160451 ms80.7%
make_passworddjango/contrib/auth/hashers.py:118451 ms80.7%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333451 ms80.7%
pbkdf2django/utils/crypto.py:93451 ms80.7%
1 smaller frames hidden
TestCreateConference.test_selected_icons_are_savedconfs/tests.py:1167 self.client.post(reverse("create_conference"), data)85 ms15.2%
Client.postdjango/test/client.py:116285 ms15.2%
RequestFactory.postdjango/test/client.py:49985 ms15.2%
RequestFactory.genericdjango/test/client.py:67185 ms15.2%
Client.requestdjango/test/client.py:109185 ms15.2%
ClientHandler.__call__django/test/client.py:17354 ms9.7%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6354 ms9.7%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10454 ms9.7%
WhiteNoise.add_fileswhitenoise/base.py:10854 ms9.7%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12049 ms8.8%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:13149 ms8.8%
WhiteNoise.get_static_filewhitenoise/base.py:21238 ms6.7%
WhiteNoise.add_cache_headerswhitenoise/base.py:23633 ms6.0%
WhiteNoise.add_cache_headerswhitenoise/base.py:2333 ms0.6%
WhiteNoiseMiddleware.immutable_file_testwhitenoise/middleware.py:1763 ms0.6%
WhiteNoiseMiddleware.get_static_urlwhitenoise/middleware.py:1973 ms0.6%
URLMixin.urldebug_toolbar/panels/staticfiles.py:203 ms0.6%
WhiteNoise.get_static_filewhitenoise/base.py:21711 ms2.1%
StaticFile.__init__whitenoise/responders.py:764 ms0.7%
StaticFile.get_not_modified_responsewhitenoise/responders.py:1894 ms0.7%
Headers.__getitem__<stdlib>/wsgiref/headers.py:834 ms0.7%
Headers.get<stdlib>/wsgiref/headers.py:1044 ms0.7%
StaticFile.__init__whitenoise/responders.py:734 ms0.7%
2 smaller frames hidden
WhiteNoise.update_files_dictionarywhitenoise/base.py:1155 ms0.9%
scantreewhitenoise/base.py:2713 ms0.6%
1 smaller frames hidden
ClientHandler.__call__django/test/client.py:18630 ms5.4%
BaseHandler.get_responsedjango/core/handlers/base.py:14230 ms5.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5630 ms5.4%
MiddlewareMixin.__call__django/utils/deprecation.py:38030 ms5.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5630 ms5.4%
MiddlewareMixin.__call__django/utils/deprecation.py:38030 ms5.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5630 ms5.4%
MiddlewareMixin.__call__django/utils/deprecation.py:38030 ms5.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5630 ms5.4%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:12330 ms5.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5630 ms5.4%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:14530 ms5.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5630 ms5.4%
MiddlewareMixin.__call__django/utils/deprecation.py:38030 ms5.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5630 ms5.4%
MiddlewareMixin.__call__django/utils/deprecation.py:38030 ms5.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5630 ms5.4%
MiddlewareMixin.__call__django/utils/deprecation.py:38030 ms5.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5630 ms5.4%
MiddlewareMixin.__call__django/utils/deprecation.py:38030 ms5.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5630 ms5.4%
MiddlewareMixin.__call__django/utils/deprecation.py:38030 ms5.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5630 ms5.4%
MiddlewareMixin.__call__django/utils/deprecation.py:38030 ms5.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5630 ms5.4%
MiddlewareMixin.__call__django/utils/deprecation.py:38030 ms5.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5630 ms5.4%
BaseHandler._get_responsedjango/core/handlers/base.py:19930 ms5.4%
user_passes_test.<locals>.decorator.<locals>._view_wrapperdjango/contrib/auth/decorators.py:6230 ms5.4%
create_conferenceconfs/views.py:498 form.save_m2m() # persist the selected conference_tags (icons)22 ms3.9%
BaseModelForm._save_m2mdjango/forms/models.py:55622 ms3.9%
ManyToManyField.save_form_datadjango/db/models/fields/related.py:213322 ms3.9%
create_forward_many_to_many_manager.<locals>.ManyRelatedManager.setdjango/db/models/fields/related_descriptors.py:143021 ms3.7%
create_forward_many_to_many_manager.<locals>.ManyRelatedManager.set_basedjango/db/models/fields/related_descriptors.py:140619 ms3.4%
QuerySet.__iter__django/db/models/query.py:43919 ms3.4%
QuerySet._fetch_alldjango/db/models/query.py:226219 ms3.4%
FlatValuesListIterable.__iter__django/db/models/query.py:30219 ms3.4%
SQLCompiler.results_iterdjango/db/models/sql/compiler.py:157419 ms3.4%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:162518 ms3.2%
CursorWrapper.executedjango/db/backends/utils.py:7918 ms3.2%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:9218 ms3.2%
CursorWrapper._executedjango/db/backends/utils.py:10518 ms3.2%
Cursor.executepsycopg/cursor.py:11318 ms3.2%
Connection.waitpsycopg/connection.py:49518 ms3.2%
1 smaller frames hidden
2 smaller frames hidden
1 smaller frames hidden
create_conferenceconfs/views.py:485 if form.is_valid():5 ms0.9%
BaseForm.is_validdjango/forms/forms.py:2065 ms0.9%
BaseForm.errorsdjango/forms/forms.py:2015 ms0.9%
BaseForm.full_cleandjango/forms/forms.py:3373 ms0.6%
BaseForm._clean_fieldsdjango/forms/forms.py:3453 ms0.6%
Field._clean_bound_fielddjango/forms/fields.py:2733 ms0.6%
ModelMultipleChoiceField.cleandjango/forms/models.py:16483 ms0.6%
1 smaller frames hidden
2 smaller frames hidden
TestCreateConference.test_selected_icons_are_savedconfs/tests.py:1161 self.client.force_login(self.user)13 ms2.2%
ClientMixin.force_logindjango/test/client.py:85813 ms2.2%
ClientMixin._logindjango/test/client.py:8846 ms1.1%
ClientMixin.sessiondjango/test/client.py:8156 ms1.1%
SessionStore.savedjango/contrib/sessions/backends/db.py:1216 ms1.1%
SessionStore.createdjango/contrib/sessions/backends/db.py:745 ms0.9%
SessionStore.savedjango/contrib/sessions/backends/db.py:1263 ms0.6%
Atomic.__enter__django/db/transaction.py:2233 ms0.6%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:263 ms0.6%
BaseDatabaseWrapper.savepointdjango/db/backends/base/base.py:4003 ms0.6%
BaseDatabaseWrapper._savepointdjango/db/backends/base/base.py:3673 ms0.6%
CursorWrapper.executedjango/db/backends/utils.py:793 ms0.6%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:923 ms0.6%
CursorWrapper._executedjango/db/backends/utils.py:1033 ms0.6%
Cursor.executepsycopg/cursor.py:1133 ms0.6%
Connection.waitpsycopg/connection.py:4953 ms0.6%
BaseCursor._execute_genpsycopg/_cursor_base.py:2063 ms0.6%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2863 ms0.6%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:783 ms0.6%
2 smaller frames hidden
1 smaller frames hidden
ClientMixin._logindjango/test/client.py:8896 ms1.1%
logindjango/contrib/auth/__init__.py:1894 ms0.7%
SessionBase.cycle_keydjango/contrib/sessions/backends/base.py:4373 ms0.6%
1 smaller frames hidden
2 smaller frames hidden
4 smaller frames hidden
Estimated from 561 samples; phase durations are exact. Frames from pytest and pluggy are hidden .

Hot lines in your code

confs/tests.py:1044
self.user = User.objects.create_user("alice", password="pw")
TestCreateConference.setUp · Password hashing
453 ms
confs/tests.py:1167
self.client.post(reverse("create_conference"), data)
TestCreateConference.test_selected_icons_are_saved · Libraries
54 ms
confs/views.py:498
form.save_m2m() # persist the selected conference_tags (icons)
create_conference · Database
22 ms
confs/tests.py:1161
self.client.force_login(self.user)
TestCreateConference.test_selected_icons_are_saved · Database
13 ms
confs/views.py:485
if form.is_valid():
create_conference · Database
5 ms
confs/views.py:475
while Conference.objects.filter(slug=slug).exists():
unique_conference_slug · Database
2 ms
confs/tests.py:1169
self.assertEqual(list(conference.conference_tags.all()), [tag])
TestCreateConference.test_selected_icons_are_saved · Database
2 ms
confs/tests.py:1164
mock.patch("confs.views.send_mail"),
TestCreateConference.test_selected_icons_are_saved · Mocking
1 ms
confs/views.py:497
conference.save()
create_conference · Database
1 ms

Fixtures

Exact setup time
_dj_autoclear_mailbox function 0.78 ms
monkeypatch function 0.26 ms
_django_isolate_apps function 0.13 ms
_template_string_if_invalid_marker function 0.05 ms
_django_db_marker function 0.05 ms
_django_set_urlconf function 0.05 ms
_live_server_helper function 0.05 ms
_django_clear_site_cache function 0.03 ms

Database

31 queries · 19 ms
No repeated queries.

Biggest pieces of work

call setUp
confs/tests.py:1044
453 ms
call test body
confs/tests.py:1167
100 ms
call _post_teardown
django/test/testcases.py:1243
2 ms
setup iscoroutinefunction
<stdlib>/inspect.py:336
2 ms
call _pre_setup
django/test/testcases.py:1154
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 558 ms c28a326 main Profile
16 hours ago CI github-actions:test passed 302 ms 9b8826a main Profile
22 hours ago CI github-actions:test passed 527 ms 4f01055 main Profile
1 week, 5 days ago CI github-actions:test passed 701 ms 8ab642e main Profile
2 weeks, 2 days ago CI github-actions:test passed 495 ms 9b75244 main Profile
2 weeks, 2 days ago CI github-actions:test passed 552 ms 9603516 main Profile
2 weeks, 4 days ago CI github-actions:test passed 570 ms 615a272 main Profile
3 weeks ago CI github-actions:test passed 476 ms d923a46 main Profile
3 weeks ago CI github-actions:test passed 1.19 s 82997f8 main Profile
3 weeks ago CI github-actions:test passed 1.03 s 623aa3e main Profile
3 weeks ago CI github-actions:test passed 1.29 s ab6465a main Profile
3 weeks ago CI github-actions:test passed 536 ms 0c23747 main Run