Tests / confs/tests.py
TestUnapproveConference::test_non_staff_forbidden
First seen 3 weeks ago in 0c23747
CI
github-actions:test
11 runs
Average
724 ms
median 662 ms
max 1.37 s
max 1.37 s
Phases
Setup 14 ms
Call 711 ms
Teardown 0.27 ms
Categories
Password hashing 669 ms
Database 31 ms
Factories 0.36 ms
Test code 0.23 ms
Other (Libraries, pytest, Unsampled, Logging) 25 ms
26 database queries per run
Needs 306 KB of memory (max 1 MB)
Duration per run
Where the time goes
Latest run in ci:github-actions:test, 7 hours ago ·
open run
setup16 ms2.4%
TestCase.setUpClassdjango/test/testcases.py:1426 cls.cls_atomics = cls._enter_atomics()15 ms2.2%
TestCase._enter_atomicsdjango/test/testcases.py:139915 ms2.2%
Atomic.__enter__django/db/transaction.py:21015 ms2.2%
BaseDatabaseWrapper.get_autocommitdjango/db/backends/base/base.py:45415 ms2.2%
SimpleTestCase.ensure_connection_patch_method.<locals>.patched_ensure_connectiondjango/test/testcases.py:30415 ms2.2%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2615 ms2.2%
BaseDatabaseWrapper.ensure_connectiondjango/db/backends/base/base.py:27915 ms2.2%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2615 ms2.2%
BaseDatabaseWrapper.connectdjango/db/backends/base/base.py:25615 ms2.2%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2615 ms2.2%
DatabaseWrapper.get_new_connectiondjango/db/backends/postgresql/base.py:34515 ms2.2%
Connection.connectpsycopg/connection.py:10915 ms2.2%
wait_connpsycopg/waiting.py:14113 ms1.9%
EpollSelector.select<stdlib>/selectors.py:45213 ms1.9%
1 smaller frames hidden
call646 ms97.6%
TestUnapproveConference.setUpconfs/tests.py:1296 self.normal = User.objects.create_user("bob", password="pw")314 ms47.5%
UserManager.create_userdjango/contrib/auth/models.py:180314 ms47.5%
UserManager._create_userdjango/contrib/auth/models.py:167313 ms47.3%
UserManager._create_user_objectdjango/contrib/auth/models.py:160313 ms47.3%
make_passworddjango/contrib/auth/hashers.py:118313 ms47.3%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333313 ms47.3%
pbkdf2django/utils/crypto.py:93313 ms47.3%
1 smaller frames hidden
TestUnapproveConference.setUpconfs/tests.py:1295 self.staff = User.objects.create_user("staff", password="pw", is_staff=True)308 ms46.5%
UserManager.create_userdjango/contrib/auth/models.py:180308 ms46.5%
UserManager._create_userdjango/contrib/auth/models.py:167306 ms46.2%
UserManager._create_user_objectdjango/contrib/auth/models.py:160306 ms46.2%
make_passworddjango/contrib/auth/hashers.py:118306 ms46.2%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333306 ms46.2%
pbkdf2django/utils/crypto.py:93306 ms46.2%
1 smaller frames hidden
TestUnapproveConference.test_non_staff_forbiddenconfs/tests.py:1306 self.client.force_login(self.normal)10 ms1.5%
ClientMixin.force_logindjango/test/client.py:85810 ms1.5%
ClientMixin._logindjango/test/client.py:8844 ms0.7%
ClientMixin.sessiondjango/test/client.py:8154 ms0.7%
SessionStore.savedjango/contrib/sessions/backends/db.py:1214 ms0.7%
SessionStore.createdjango/contrib/sessions/backends/db.py:704 ms0.7%
ClientMixin._logindjango/test/client.py:8894 ms0.7%
1 smaller frames hidden
TestUnapproveConference.test_non_staff_forbiddenconfs/tests.py:1307 response = self.client.post(self.url)10 ms1.5%
Client.postdjango/test/client.py:116210 ms1.5%
RequestFactory.postdjango/test/client.py:49910 ms1.5%
RequestFactory.genericdjango/test/client.py:67110 ms1.5%
Client.requestdjango/test/client.py:109110 ms1.5%
ClientHandler.__call__django/test/client.py:17310 ms1.5%
BaseHandler.load_middlewaredjango/core/handlers/base.py:639 ms1.3%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:1046 ms1.0%
WhiteNoise.add_fileswhitenoise/base.py:1086 ms1.0%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1154 ms0.7%
1 smaller frames hidden
1 smaller frames hidden
1 smaller frames hidden
2 smaller frames hidden
Estimated from 613 samples; phase durations are exact. Frames from pytest and pluggy are
hidden
.
Hot lines in your code
|
confs/tests.py:1296
self.normal = User.objects.create_user("bob", password="pw")
TestUnapproveConference.setUp
· Password hashing
|
314 ms |
|
confs/tests.py:1295
self.staff = User.objects.create_user("staff", password="pw", is_staff=True)
TestUnapproveConference.setUp
· Password hashing
|
308 ms |
|
confs/tests.py:1306
self.client.force_login(self.normal)
TestUnapproveConference.test_non_staff_forbidden
· Database
|
10 ms |
|
confs/tests.py:1307
response = self.client.post(self.url)
TestUnapproveConference.test_non_staff_forbidden
· Libraries
|
10 ms |
|
confs/tests.py:1294
self.conference = baker.make(Conference, approved_at=timezone.now(), tags="tag1")
TestUnapproveConference.setUp
· Database
|
3 ms |
Fixtures
Exact setup time| _unittest_setUpClass_fixture_TestUnapproveConference class | 14 ms |
| _django_setup_unittest class | 0.36 ms |
| _django_db_marker function | 0.04 ms |
| _template_string_if_invalid_marker function | 0.04 ms |
| _live_server_helper function | 0.04 ms |
| _dj_autoclear_mailbox function | 0.04 ms |
| _django_isolate_apps function | 0.03 ms |
| _django_set_urlconf function | 0.03 ms |
| _django_clear_site_cache function | 0.03 ms |
| monkeypatch function | 0.02 ms |
Database
26 queries · 15 msNo repeated queries.
Biggest pieces of work
|
call setUp
confs/tests.py:1296
|
625 ms |
|
call test body
confs/tests.py:1306
|
19 ms |
|
setup setUpClass
django/test/testcases.py:1426
|
15 ms |
|
call _pre_setup
django/test/testcases.py:1167
|
1 ms |
| setup pytest internals | 1 ms |
Reliability
12 results · 0 CI failures · 0 local failuresThis test hasn't failed recently.
History
Latest 12 results, oldest first in the strip| When | Environment | Outcome | Duration | |
|---|---|---|---|---|
| 7 hours ago | CI github-actions:test | passed | 662 ms | Profile |
| 16 hours ago | CI github-actions:test | passed | 439 ms | Profile |
| 22 hours ago | CI github-actions:test | passed | 646 ms | Profile |
| 1 week, 5 days ago | CI github-actions:test | passed | 654 ms | Profile |
| 2 weeks, 2 days ago | CI github-actions:test | passed | 850 ms | Profile |
| 2 weeks, 2 days ago | CI github-actions:test | passed | 644 ms | Profile |
| 2 weeks, 4 days ago | CI github-actions:test | passed | 692 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 525 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 809 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 683 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 1.37 s | Profile |
| 3 weeks ago | CI github-actions:test | passed | 638 ms | Run |