flakytest.dev anze3db fedidevs
Tests / confs/tests.py

TestUnapproveConference::test_non_staff_forbidden

First seen 12 hours ago in 0c23747
CI github-actions:test 4 runs
Average
845 ms
median 746 ms
max 1.37 s
Phases
Setup 17 ms Call 828 ms Teardown 0.28 ms
Categories
Password hashing 771 ms Database 33 ms Test code 0.62 ms Factories 0.20 ms Other (Libraries, pytest, Unsampled) 40 ms

26 database queries per run

Needs 17 KB of memory (max 40 KB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, 7 hours ago · open run
Show pytest frames
setup7 ms1.4%
TestCase.setUpClassdjango/test/testcases.py:1426 cls.cls_atomics = cls._enter_atomics()7 ms1.4%
TestCase._enter_atomicsdjango/test/testcases.py:13997 ms1.4%
Atomic.__enter__django/db/transaction.py:2107 ms1.4%
BaseDatabaseWrapper.get_autocommitdjango/db/backends/base/base.py:4547 ms1.4%
SimpleTestCase.ensure_connection_patch_method.<locals>.patched_ensure_connectiondjango/test/testcases.py:3047 ms1.4%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:267 ms1.4%
BaseDatabaseWrapper.ensure_connectiondjango/db/backends/base/base.py:2797 ms1.4%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:267 ms1.4%
BaseDatabaseWrapper.connectdjango/db/backends/base/base.py:2567 ms1.4%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:267 ms1.4%
DatabaseWrapper.get_new_connectiondjango/db/backends/postgresql/base.py:3457 ms1.4%
Connection.connectpsycopg/connection.py:1097 ms1.4%
wait_connpsycopg/waiting.py:1414 ms0.8%
EpollSelector.select<stdlib>/selectors.py:4524 ms0.8%
wait_connpsycopg/waiting.py:1453 ms0.5%
BaseConnection._connect_genpsycopg/_connection_base.py:4393 ms0.5%
call517 ms98.6%
TestUnapproveConference.setUpconfs/tests.py:1295 self.staff = User.objects.create_user("staff", password="pw", is_staff=True)248 ms47.3%
UserManager.create_userdjango/contrib/auth/models.py:180248 ms47.3%
UserManager._create_userdjango/contrib/auth/models.py:167246 ms46.9%
UserManager._create_user_objectdjango/contrib/auth/models.py:160246 ms46.9%
make_passworddjango/contrib/auth/hashers.py:118246 ms46.9%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333246 ms46.9%
pbkdf2django/utils/crypto.py:93246 ms46.9%
1 smaller frames hidden
TestUnapproveConference.setUpconfs/tests.py:1296 self.normal = User.objects.create_user("bob", password="pw")245 ms46.7%
UserManager.create_userdjango/contrib/auth/models.py:180245 ms46.7%
UserManager._create_userdjango/contrib/auth/models.py:167244 ms46.5%
UserManager._create_user_objectdjango/contrib/auth/models.py:160244 ms46.5%
make_passworddjango/contrib/auth/hashers.py:118244 ms46.5%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333244 ms46.5%
pbkdf2django/utils/crypto.py:93244 ms46.5%
1 smaller frames hidden
TestUnapproveConference.test_non_staff_forbiddenconfs/tests.py:1307 response = self.client.post(self.url)11 ms2.2%
Client.postdjango/test/client.py:116211 ms2.2%
RequestFactory.postdjango/test/client.py:49911 ms2.2%
RequestFactory.genericdjango/test/client.py:67111 ms2.2%
Client.requestdjango/test/client.py:109111 ms2.2%
ClientHandler.__call__django/test/client.py:17311 ms2.2%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6311 ms2.2%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10411 ms2.2%
WhiteNoise.add_fileswhitenoise/base.py:10811 ms2.2%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1207 ms1.4%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:1317 ms1.4%
WhiteNoise.get_static_filewhitenoise/base.py:2176 ms1.2%
1 smaller frames hidden
WhiteNoise.update_files_dictionarywhitenoise/base.py:1154 ms0.8%
scantreewhitenoise/base.py:2714 ms0.8%
scantreewhitenoise/base.py:2713 ms0.6%
1 smaller frames hidden
TestUnapproveConference.test_non_staff_forbiddenconfs/tests.py:1306 self.client.force_login(self.normal)8 ms1.6%
ClientMixin.force_logindjango/test/client.py:8588 ms1.6%
ClientMixin._logindjango/test/client.py:8844 ms0.8%
ClientMixin.sessiondjango/test/client.py:8154 ms0.8%
SessionStore.savedjango/contrib/sessions/backends/db.py:1214 ms0.8%
SessionStore.createdjango/contrib/sessions/backends/db.py:703 ms0.6%
SessionBase._get_new_session_keydjango/contrib/sessions/backends/base.py:2013 ms0.6%
SessionStore.existsdjango/contrib/sessions/backends/db.py:633 ms0.6%
1 smaller frames hidden
ClientMixin._logindjango/test/client.py:8893 ms0.6%
1 smaller frames hidden
2 smaller frames hidden
Estimated from 503 samples; phase durations are exact. Frames from pytest and pluggy are hidden .

Hot lines in your code

confs/tests.py:1295
self.staff = User.objects.create_user("staff", password="pw", is_staff=True)
TestUnapproveConference.setUp · Password hashing
248 ms
confs/tests.py:1296
self.normal = User.objects.create_user("bob", password="pw")
TestUnapproveConference.setUp · Password hashing
245 ms
confs/tests.py:1307
response = self.client.post(self.url)
TestUnapproveConference.test_non_staff_forbidden · Libraries
11 ms
confs/tests.py:1306
self.client.force_login(self.normal)
TestUnapproveConference.test_non_staff_forbidden · Database
8 ms
confs/tests.py:1294
self.conference = baker.make(Conference, approved_at=timezone.now(), tags="tag1")
TestUnapproveConference.setUp · Database
2 ms

Fixtures

Exact setup time
_unittest_setUpClass_fixture_TestUnapproveConference class 6 ms
_django_setup_unittest class 0.26 ms
_dj_autoclear_mailbox function 0.03 ms
_django_db_marker function 0.03 ms
_template_string_if_invalid_marker function 0.03 ms
_django_isolate_apps function 0.02 ms
_live_server_helper function 0.02 ms
_django_clear_site_cache function 0.02 ms
_django_set_urlconf function 0.02 ms
monkeypatch function 0.01 ms

Database

26 queries · 12 ms
No repeated queries.

Biggest pieces of work

call setUp
confs/tests.py:1295
496 ms
call test body
confs/tests.py:1306
20 ms
setup setUpClass
django/test/testcases.py:1426
7 ms
call _pre_setup
django/test/testcases.py:1167
1 ms
call pytest internals 1 ms

Reliability

5 results · 0 CI failures · 0 local failures

This test hasn't failed recently.

History

Latest 5 results, oldest first in the strip
When Environment Outcome Duration Commit
7 hours ago CI github-actions:test passed 525 ms d923a46 main Profile
7 hours ago CI github-actions:test passed 809 ms 82997f8 main Profile
7 hours ago CI github-actions:test passed 683 ms 623aa3e main Profile
12 hours ago CI github-actions:test passed 1.37 s ab6465a main Profile
12 hours ago CI github-actions:test passed 638 ms 0c23747 main Run