Tests / confs/tests.py
TestApproveConference::test_anonymous_redirected_to_login
First seen 12 hours ago in 0c23747
CI
github-actions:test
4 runs
Average
1.62 s
median 1.83 s
max 2.05 s
max 2.05 s
Phases
Setup 18 ms
Call 1.60 s
Teardown 0.31 ms
Categories
Password hashing 1.50 s
Database 31 ms
Factories 1 ms
Test code 0.70 ms
App code 0.25 ms
Other (Libraries, pytest, Unsampled) 84 ms
9 database queries per run
Needs 5 KB of memory (max 16 KB)
Duration per run
Where the time goes
Latest run in ci:github-actions:test, 7 hours ago ·
open run
setup13 ms1.7%
TestCase.setUpClassdjango/test/testcases.py:1426 cls.cls_atomics = cls._enter_atomics()13 ms1.7%
TestCase._enter_atomicsdjango/test/testcases.py:139913 ms1.7%
Atomic.__enter__django/db/transaction.py:21013 ms1.7%
BaseDatabaseWrapper.get_autocommitdjango/db/backends/base/base.py:45413 ms1.7%
SimpleTestCase.ensure_connection_patch_method.<locals>.patched_ensure_connectiondjango/test/testcases.py:30413 ms1.7%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2613 ms1.7%
BaseDatabaseWrapper.ensure_connectiondjango/db/backends/base/base.py:27913 ms1.7%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2613 ms1.7%
BaseDatabaseWrapper.connectdjango/db/backends/base/base.py:25613 ms1.7%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2613 ms1.7%
DatabaseWrapper.get_new_connectiondjango/db/backends/postgresql/base.py:34513 ms1.7%
Connection.connectpsycopg/connection.py:10913 ms1.7%
wait_connpsycopg/waiting.py:1416 ms0.8%
EpollSelector.select<stdlib>/selectors.py:4526 ms0.8%
wait_connpsycopg/waiting.py:1454 ms0.6%
BaseConnection._connect_genpsycopg/_connection_base.py:4394 ms0.6%
1 smaller frames hidden
call762 ms98.3%
TestApproveConference.setUpconfs/tests.py:1372 self.normal = User.objects.create_user("bob", password="pw")386 ms49.8%
UserManager.create_userdjango/contrib/auth/models.py:180386 ms49.8%
UserManager._create_userdjango/contrib/auth/models.py:167386 ms49.8%
UserManager._create_user_objectdjango/contrib/auth/models.py:160386 ms49.8%
make_passworddjango/contrib/auth/hashers.py:118386 ms49.8%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333386 ms49.8%
pbkdf2django/utils/crypto.py:93386 ms49.8%
TestApproveConference.setUpconfs/tests.py:1371 self.staff = User.objects.create_user("staff", password="pw", is_staff=True)356 ms45.9%
UserManager.create_userdjango/contrib/auth/models.py:180356 ms45.9%
UserManager._create_userdjango/contrib/auth/models.py:167353 ms45.5%
UserManager._create_user_objectdjango/contrib/auth/models.py:160353 ms45.5%
make_passworddjango/contrib/auth/hashers.py:118353 ms45.5%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333353 ms45.5%
pbkdf2django/utils/crypto.py:93352 ms45.4%
1 smaller frames hidden
TestApproveConference.test_anonymous_redirected_to_loginconfs/tests.py:1383 response = self.client.post(self.url)10 ms1.4%
Client.postdjango/test/client.py:116210 ms1.4%
RequestFactory.postdjango/test/client.py:49910 ms1.4%
RequestFactory.genericdjango/test/client.py:67110 ms1.4%
Client.requestdjango/test/client.py:109110 ms1.4%
ClientHandler.__call__django/test/client.py:1739 ms1.2%
BaseHandler.load_middlewaredjango/core/handlers/base.py:639 ms1.2%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:1048 ms1.1%
WhiteNoise.add_fileswhitenoise/base.py:1088 ms1.1%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1154 ms0.5%
scantreewhitenoise/base.py:2714 ms0.5%
scantreewhitenoise/base.py:2714 ms0.5%
1 smaller frames hidden
1 smaller frames hidden
1 smaller frames hidden
5 smaller frames hidden
Estimated from 740 samples; phase durations are exact. Frames from pytest and pluggy are
hidden
.
Hot lines in your code
|
confs/tests.py:1372
self.normal = User.objects.create_user("bob", password="pw")
TestApproveConference.setUp
· Password hashing
|
386 ms |
|
confs/tests.py:1371
self.staff = User.objects.create_user("staff", password="pw", is_staff=True)
TestApproveConference.setUp
· Password hashing
|
356 ms |
|
confs/tests.py:1383
response = self.client.post(self.url)
TestApproveConference.test_anonymous_redirected_to_login
· Libraries
|
9 ms |
|
confs/tests.py:1370
self.conference = baker.make(Conference, approved_at=None, tags="tag1")
TestApproveConference.setUp
· Database
|
3 ms |
|
confs/tests.py:1385
self.conference.refresh_from_db()
TestApproveConference.test_anonymous_redirected_to_login
· Database
|
2 ms |
|
confs/tests.py:1373
self.url = reverse("approve_conference", kwargs={"conference_slug": self.conference.slug})
TestApproveConference.setUp
· Libraries
|
1 ms |
|
fedidevs/middleware.py:46
if _is_private_request(request) and response.status_code == 200 and content_type.startswith("text/html"):
AnonymousCacheMiddleware.process_response
· App code
|
1 ms |
Fixtures
Exact setup time| _unittest_setUpClass_fixture_TestApproveConference class | 12 ms |
| _django_setup_unittest class | 0.29 ms |
| _dj_autoclear_mailbox function | 0.06 ms |
| _template_string_if_invalid_marker function | 0.04 ms |
| _django_db_marker function | 0.04 ms |
| _django_isolate_apps function | 0.03 ms |
| _live_server_helper function | 0.03 ms |
| _django_clear_site_cache function | 0.03 ms |
| _django_set_urlconf function | 0.03 ms |
| monkeypatch function | 0.02 ms |
Database
9 queries · 9 msNo repeated queries.
Biggest pieces of work
|
call setUp
confs/tests.py:1372
|
746 ms |
|
setup setUpClass
django/test/testcases.py:1426
|
13 ms |
|
call test body
confs/tests.py:1383
|
13 ms |
|
call _post_teardown
django/test/testcases.py:1243
|
2 ms |
|
call _pre_setup
django/test/testcases.py:1167
|
1 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 | 775 ms | Profile |
| 7 hours ago | CI github-actions:test | passed | 1.95 s | Profile |
| 7 hours ago | CI github-actions:test | passed | 2.05 s | Profile |
| 12 hours ago | CI github-actions:test | passed | 1.72 s | Profile |
| 12 hours ago | CI github-actions:test | passed | 950 ms | Run |