Tests / confs/tests.py
TestEditConference::test_other_user_forbidden
First seen 1 month, 1 week ago in 0c23747
CI
github-actions:test
13 runs
Average
1.68 s
median 1.48 s
max 2.71 s
max 2.71 s
Phases
Setup 2 ms
Call 1.67 s
Teardown 0.75 ms
Categories
Password hashing 1.59 s
Database 28 ms
Factories 0.27 ms
Test code 0.08 ms
Other (Libraries, pytest, Unsampled, Logging, ...) 55 ms
27 database queries per run
Needs 19 KB of memory (max 68 KB)
Duration per run
Where the time goes
Latest run in ci:github-actions:test, 2 weeks ago ·
open run
call1.31 s99.9%
TestEditConference.setUpconfs/tests.py:1175 self.owner = User.objects.create_user("owner", password="pw")466 ms35.4%
UserManager.create_userdjango/contrib/auth/models.py:180466 ms35.4%
UserManager._create_userdjango/contrib/auth/models.py:167465 ms35.3%
UserManager._create_user_objectdjango/contrib/auth/models.py:160465 ms35.3%
make_passworddjango/contrib/auth/hashers.py:118465 ms35.3%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333465 ms35.3%
pbkdf2django/utils/crypto.py:93465 ms35.3%
1 smaller frames hidden
TestEditConference.setUpconfs/tests.py:1177 self.staff = User.objects.create_user("staff", password="pw", is_staff=True)405 ms30.8%
UserManager.create_userdjango/contrib/auth/models.py:180405 ms30.8%
UserManager._create_userdjango/contrib/auth/models.py:167404 ms30.7%
UserManager._create_user_objectdjango/contrib/auth/models.py:160404 ms30.7%
make_passworddjango/contrib/auth/hashers.py:118404 ms30.7%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333404 ms30.7%
pbkdf2django/utils/crypto.py:93404 ms30.7%
1 smaller frames hidden
TestEditConference.setUpconfs/tests.py:1176 self.other = User.objects.create_user("other", password="pw")363 ms27.6%
UserManager.create_userdjango/contrib/auth/models.py:180363 ms27.6%
UserManager._create_userdjango/contrib/auth/models.py:167362 ms27.5%
UserManager._create_user_objectdjango/contrib/auth/models.py:160362 ms27.5%
make_passworddjango/contrib/auth/hashers.py:118362 ms27.5%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333362 ms27.5%
pbkdf2django/utils/crypto.py:93362 ms27.5%
1 smaller frames hidden
TestEditConference.test_other_user_forbiddenconfs/tests.py:1236 response = self.client.get(self.url)42 ms3.2%
Client.getdjango/test/client.py:113342 ms3.2%
RequestFactory.getdjango/test/client.py:47542 ms3.2%
RequestFactory.genericdjango/test/client.py:67142 ms3.2%
Client.requestdjango/test/client.py:109142 ms3.2%
ClientHandler.__call__django/test/client.py:17342 ms3.2%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6342 ms3.2%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10442 ms3.2%
WhiteNoise.add_fileswhitenoise/base.py:10842 ms3.2%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12036 ms2.7%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:13135 ms2.7%
WhiteNoise.get_static_filewhitenoise/base.py:21734 ms2.6%
StaticFile.__init__whitenoise/responders.py:7730 ms2.3%
StaticFile.get_alternativeswhitenoise/responders.py:19830 ms2.3%
StaticFile.get_alternatives.<locals>.<lambda>whitenoise/responders.py:19827 ms2.1%
<GC>~27 ms2.1%
3 smaller frames hidden
1 smaller frames hidden
1 smaller frames hidden
TransactionTestCase._post_teardowndjango/test/testcases.py:1243 self._fixture_teardown()34 ms2.6%
TestCase._fixture_teardowndjango/test/testcases.py:149834 ms2.6%
DatabaseWrapper.check_constraintsdjango/db/backends/postgresql/base.py:49534 ms2.6%
CursorWrapper.executedjango/db/backends/utils.py:7934 ms2.6%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:9234 ms2.6%
CursorWrapper._executedjango/db/backends/utils.py:10334 ms2.6%
Cursor.executepsycopg/cursor.py:11334 ms2.6%
Connection.waitpsycopg/connection.py:49534 ms2.6%
2 smaller frames hidden
Estimated from 1,315 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
|
466 ms |
|
confs/tests.py:1177
self.staff = User.objects.create_user("staff", password="pw", is_staff=True)
TestEditConference.setUp
· Password hashing
|
405 ms |
|
confs/tests.py:1176
self.other = User.objects.create_user("other", password="pw")
TestEditConference.setUp
· Password hashing
|
363 ms |
|
confs/tests.py:1236
response = self.client.get(self.url)
TestEditConference.test_other_user_forbidden
· Libraries
|
42 ms |
|
confs/tests.py:1235
self.client.force_login(self.other)
TestEditConference.test_other_user_forbidden
· Database
|
4 ms |
|
confs/tests.py:1178
self.conference = baker.make(
TestEditConference.setUp
· Database
|
1.00 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.03 ms |
| _django_isolate_apps function | 0.03 ms |
| _django_set_urlconf function | 0.03 ms |
| _live_server_helper function | 0.03 ms |
| _django_clear_site_cache function | 0.02 ms |
| monkeypatch function | 0.02 ms |
Database
27 queries · 12 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.23 s |
|
call test body
confs/tests.py:1236
|
46 ms |
|
call _post_teardown
django/test/testcases.py:1243
|
34 ms |
Reliability
14 results · 0 CI failures · 0 local failuresThis test hasn't failed recently.
History
Latest 14 results, oldest first in the strip| When | Environment | Outcome | Duration | |
|---|---|---|---|---|
| 2 weeks ago | CI github-actions:test | passed | 1.32 s | Profile |
| 2 weeks, 5 days ago | CI github-actions:test | passed | 1.44 s | Profile |
| 2 weeks, 6 days ago | CI github-actions:test | passed | 1.58 s | Profile |
| 3 weeks ago | CI github-actions:test | passed | 994 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 1.78 s | Profile |
| 1 month ago | CI github-actions:test | passed | 1.62 s | Profile |
| 1 month ago | CI github-actions:test | passed | 1.35 s | Profile |
| 1 month ago | CI github-actions:test | passed | 1.48 s | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 1.40 s | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 1.13 s | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 2.71 s | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 2.65 s | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 2.34 s | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 1.34 s | Run |