Tests / confs/tests.py
TestCreateConference::test_slug_collision_is_resolved
First seen 12 hours ago in 0c23747
CI
github-actions:test
4 runs
Average
982 ms
median 1.06 s
max 1.34 s
max 1.34 s
Phases
Setup 13 ms
Call 969 ms
Teardown 0.31 ms
Categories
Password hashing 746 ms
Database 64 ms
Factories 2 ms
Test code 0.57 ms
Other (Libraries, Deep copies, pytest, Unsampled, ...) 170 ms
29 database queries per run
Needs 66 KB of memory (max 132 KB)
Duration per run
Where the time goes
Latest run in ci:github-actions:test, 7 hours ago ·
open run
setup0.72 ms0.2%
call456 ms99.8%
TestCreateConference.setUpconfs/tests.py:1044 self.user = User.objects.create_user("alice", password="pw")422 ms92.3%
UserManager.create_userdjango/contrib/auth/models.py:180422 ms92.3%
UserManager._create_userdjango/contrib/auth/models.py:167422 ms92.3%
UserManager._create_user_objectdjango/contrib/auth/models.py:160422 ms92.3%
make_passworddjango/contrib/auth/hashers.py:118422 ms92.3%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333422 ms92.3%
pbkdf2django/utils/crypto.py:93422 ms92.3%
TestCreateConference.test_slug_collision_is_resolvedconfs/tests.py:1111 self.client.post(reverse("create_conference"), self.form_data)22 ms4.9%
Client.postdjango/test/client.py:116222 ms4.9%
RequestFactory.postdjango/test/client.py:49922 ms4.9%
RequestFactory.genericdjango/test/client.py:67122 ms4.9%
Client.requestdjango/test/client.py:109122 ms4.9%
ClientHandler.__call__django/test/client.py:17315 ms3.3%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6315 ms3.3%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10415 ms3.3%
WhiteNoise.add_fileswhitenoise/base.py:10815 ms3.3%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1209 ms1.9%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:1319 ms1.9%
WhiteNoise.get_static_filewhitenoise/base.py:2175 ms1.2%
StaticFile.__init__whitenoise/responders.py:733 ms0.7%
1 smaller frames hidden
1 smaller frames hidden
WhiteNoise.update_files_dictionarywhitenoise/base.py:1155 ms1.2%
scantreewhitenoise/base.py:2715 ms1.2%
scantreewhitenoise/base.py:2714 ms0.9%
1 smaller frames hidden
ClientHandler.__call__django/test/client.py:1867 ms1.6%
BaseHandler.get_responsedjango/core/handlers/base.py:1427 ms1.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:567 ms1.6%
MiddlewareMixin.__call__django/utils/deprecation.py:3807 ms1.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:567 ms1.6%
MiddlewareMixin.__call__django/utils/deprecation.py:3807 ms1.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:567 ms1.6%
MiddlewareMixin.__call__django/utils/deprecation.py:3807 ms1.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:567 ms1.6%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:1237 ms1.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:567 ms1.6%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:1457 ms1.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:567 ms1.6%
MiddlewareMixin.__call__django/utils/deprecation.py:3807 ms1.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:567 ms1.6%
MiddlewareMixin.__call__django/utils/deprecation.py:3807 ms1.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:567 ms1.6%
MiddlewareMixin.__call__django/utils/deprecation.py:3807 ms1.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:567 ms1.6%
MiddlewareMixin.__call__django/utils/deprecation.py:3807 ms1.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:567 ms1.6%
MiddlewareMixin.__call__django/utils/deprecation.py:3807 ms1.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:567 ms1.6%
MiddlewareMixin.__call__django/utils/deprecation.py:3807 ms1.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:567 ms1.6%
MiddlewareMixin.__call__django/utils/deprecation.py:3807 ms1.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:567 ms1.6%
BaseHandler._get_responsedjango/core/handlers/base.py:1997 ms1.6%
user_passes_test.<locals>.decorator.<locals>._view_wrapperdjango/contrib/auth/decorators.py:625 ms1.2%
1 smaller frames hidden
TestCreateConference.test_slug_collision_is_resolvedconfs/tests.py:1106 self.client.force_login(self.user)6 ms1.4%
ClientMixin.force_logindjango/test/client.py:8586 ms1.4%
ClientMixin._logindjango/test/client.py:8893 ms0.7%
2 smaller frames hidden
TestCreateConference.test_slug_collision_is_resolvedconfs/tests.py:1105 baker.make(Conference, slug="pycon-test")3 ms0.7%
makemodel_bakery/baker.py:1753 ms0.7%
Baker.makemodel_bakery/baker.py:4543 ms0.7%
2 smaller frames hidden
Estimated from 427 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
|
422 ms |
|
confs/tests.py:1111
self.client.post(reverse("create_conference"), self.form_data)
TestCreateConference.test_slug_collision_is_resolved
· Libraries
|
17 ms |
|
confs/tests.py:1106
self.client.force_login(self.user)
TestCreateConference.test_slug_collision_is_resolved
· Database
|
6 ms |
|
confs/tests.py:1105
baker.make(Conference, slug="pycon-test")
TestCreateConference.test_slug_collision_is_resolved
· Database
|
3 ms |
|
confs/views.py:420
super().__init__(*args, **kwargs)
ConferenceForm.__init__
· Deep copies
|
2 ms |
|
confs/views.py:475
while Conference.objects.filter(slug=slug).exists():
unique_conference_slug
· Database
|
1 ms |
|
confs/views.py:497
conference.save()
create_conference
· Database
|
1 ms |
|
confs/views.py:498
form.save_m2m() # persist the selected conference_tags (icons)
create_conference
· Database
|
1 ms |
|
confs/views.py:606
send_mail(
send_approval_notification
· Mocking
|
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.03 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.02 ms |
| monkeypatch function | 0.02 ms |
Database
29 queries · 11 ms
Repeated queries are usually N+1 lookups: fetch them once with select_related / prefetch_related (or selectinload).
3×
SELECT %s AS "a" FROM "confs_conference" WHERE "confs_conference"."slug" = %s LIMIT ?
Biggest pieces of work
|
call setUp
confs/tests.py:1044
|
422 ms |
|
call test body
confs/tests.py:1111
|
33 ms |
|
call _post_teardown
django/test/testcases.py:1243
|
1 ms |
| setup pytest internals | 0.72 ms |
Reliability
5 results · 0 CI failures · 0 local failuresThis test hasn't failed recently.
History
Latest 5 results, oldest first in the strip| When | Environment | Outcome | Duration | |
|---|---|---|---|---|
| 7 hours ago | CI github-actions:test | passed | 457 ms | Profile |
| 7 hours ago | CI github-actions:test | passed | 1.34 s | Profile |
| 7 hours ago | CI github-actions:test | passed | 1.04 s | Profile |
| 12 hours ago | CI github-actions:test | passed | 1.09 s | Profile |
| 12 hours ago | CI github-actions:test | passed | 811 ms | Run |