Tests / confs/tests.py
TestEditConference::test_other_user_forbidden
First seen 12 hours ago in 0c23747
CI
github-actions:test
4 runs
Average
2.21 s
median 2.49 s
max 2.71 s
max 2.71 s
Phases
Setup 2 ms
Call 2.20 s
Teardown 0.44 ms
Categories
Password hashing 2.09 s
Database 30 ms
Factories 0.88 ms
Other (Libraries, Unsampled, pytest, Logging, ...) 90 ms
27 database queries per run
Needs 26 KB of memory (max 64 KB)
Duration per run
Where the time goes
Latest run in ci:github-actions:test, 6 hours ago ·
open run
setup2 ms0.1%
call1.13 s99.8%
TestEditConference.setUpconfs/tests.py:1175 self.owner = User.objects.create_user("owner", password="pw")381 ms33.8%
UserManager.create_userdjango/contrib/auth/models.py:180381 ms33.8%
UserManager._create_userdjango/contrib/auth/models.py:167380 ms33.7%
UserManager._create_user_objectdjango/contrib/auth/models.py:160380 ms33.7%
make_passworddjango/contrib/auth/hashers.py:118380 ms33.7%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333380 ms33.7%
pbkdf2django/utils/crypto.py:93380 ms33.7%
1 smaller frames hidden
TestEditConference.setUpconfs/tests.py:1177 self.staff = User.objects.create_user("staff", password="pw", is_staff=True)372 ms33.0%
UserManager.create_userdjango/contrib/auth/models.py:180372 ms33.0%
UserManager._create_userdjango/contrib/auth/models.py:167372 ms33.0%
UserManager._create_user_objectdjango/contrib/auth/models.py:160372 ms33.0%
make_passworddjango/contrib/auth/hashers.py:118372 ms33.0%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333372 ms33.0%
pbkdf2django/utils/crypto.py:93372 ms33.0%
TestEditConference.setUpconfs/tests.py:1176 self.other = User.objects.create_user("other", password="pw")343 ms30.4%
UserManager.create_userdjango/contrib/auth/models.py:180343 ms30.4%
UserManager._create_userdjango/contrib/auth/models.py:167343 ms30.4%
UserManager._create_user_objectdjango/contrib/auth/models.py:160343 ms30.4%
make_passworddjango/contrib/auth/hashers.py:118343 ms30.4%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333343 ms30.4%
pbkdf2django/utils/crypto.py:93343 ms30.4%
TestEditConference.test_other_user_forbiddenconfs/tests.py:1236 response = self.client.get(self.url)19 ms1.6%
Client.getdjango/test/client.py:113319 ms1.6%
RequestFactory.getdjango/test/client.py:47519 ms1.6%
RequestFactory.genericdjango/test/client.py:67119 ms1.6%
Client.requestdjango/test/client.py:109119 ms1.6%
ClientHandler.__call__django/test/client.py:17317 ms1.5%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6317 ms1.5%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10417 ms1.5%
WhiteNoise.add_fileswhitenoise/base.py:10817 ms1.5%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1159 ms0.8%
scantreewhitenoise/base.py:2719 ms0.8%
scantreewhitenoise/base.py:2718 ms0.7%
1 smaller frames hidden
WhiteNoise.update_files_dictionarywhitenoise/base.py:1207 ms0.6%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:1317 ms0.6%
1 smaller frames hidden
TestEditConference.test_other_user_forbiddenconfs/tests.py:1235 self.client.force_login(self.other)8 ms0.7%
ClientMixin.force_logindjango/test/client.py:8588 ms0.7%
2 smaller frames hidden
Estimated from 1,092 samples; phase durations are exact. Frames from pytest and pluggy are
hidden
.
Hot lines in your code
|
confs/tests.py:1175
self.owner = User.objects.create_user("owner", password="pw")
TestEditConference.setUp
· Password hashing
|
381 ms |
|
confs/tests.py:1177
self.staff = User.objects.create_user("staff", password="pw", is_staff=True)
TestEditConference.setUp
· Password hashing
|
372 ms |
|
confs/tests.py:1176
self.other = User.objects.create_user("other", password="pw")
TestEditConference.setUp
· Password hashing
|
343 ms |
|
confs/tests.py:1236
response = self.client.get(self.url)
TestEditConference.test_other_user_forbidden
· Libraries
|
18 ms |
|
confs/tests.py:1235
self.client.force_login(self.other)
TestEditConference.test_other_user_forbidden
· Database
|
8 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
|
1 ms |
Fixtures
Exact setup time| _template_string_if_invalid_marker function | 0.26 ms |
| _dj_autoclear_mailbox function | 0.05 ms |
| _django_isolate_apps function | 0.05 ms |
| _django_db_marker 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
27 queries · 10 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:1175
|
1.10 s |
|
call test body
confs/tests.py:1236
|
27 ms |
|
call _pre_setup
django/test/testcases.py:1167
|
1 ms |
|
setup __init__
__init__:-1
|
0.84 ms |
|
setup iscoroutinefunction
<stdlib>/inspect.py:334
|
0.84 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 | |
|---|---|---|---|---|
| 6 hours ago | CI github-actions:test | passed | 1.13 s | Profile |
| 6 hours ago | CI github-actions:test | passed | 2.71 s | Profile |
| 7 hours ago | CI github-actions:test | passed | 2.65 s | Profile |
| 11 hours ago | CI github-actions:test | passed | 2.34 s | Profile |
| 12 hours ago | CI github-actions:test | passed | 1.34 s | Run |