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

TestUnapproveConference::test_non_staff_forbidden

First seen 1 month, 1 week ago in 0c23747
CI github-actions:test 13 runs
Average
705 ms
median 662 ms
max 1.37 s
Phases
Setup 13 ms Call 692 ms Teardown 0.27 ms
Categories
Password hashing 652 ms Database 29 ms Factories 0.31 ms Test code 0.19 ms Other (Libraries, pytest, Unsampled, Logging) 24 ms

26 database queries per run

Needs 426 KB of memory (max 1 MB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, 2 weeks ago · open run
Show pytest frames
setup7 ms1.3%
TestCase.setUpClassdjango/test/testcases.py:1426 cls.cls_atomics = cls._enter_atomics()7 ms1.3%
TestCase._enter_atomicsdjango/test/testcases.py:13997 ms1.3%
Atomic.__enter__django/db/transaction.py:2107 ms1.3%
BaseDatabaseWrapper.get_autocommitdjango/db/backends/base/base.py:4547 ms1.3%
SimpleTestCase.ensure_connection_patch_method.<locals>.patched_ensure_connectiondjango/test/testcases.py:3047 ms1.3%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:267 ms1.3%
BaseDatabaseWrapper.ensure_connectiondjango/db/backends/base/base.py:2797 ms1.3%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:267 ms1.3%
BaseDatabaseWrapper.connectdjango/db/backends/base/base.py:2567 ms1.3%
DatabaseWrapper.get_new_connectionfedidevs/db/postgresql/base.py:39 return super().get_new_connection(conn_params)7 ms1.3%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:267 ms1.3%
DatabaseWrapper.get_new_connectiondjango/db/backends/postgresql/base.py:3457 ms1.3%
Connection.connectpsycopg/connection.py:1097 ms1.3%
wait_connpsycopg/waiting.py:1415 ms0.9%
EpollSelector.select<stdlib>/selectors.py:4525 ms0.9%
1 smaller frames hidden
call526 ms98.6%
TestUnapproveConference.setUpconfs/tests.py:1296 self.normal = User.objects.create_user("bob", password="pw")254 ms47.7%
UserManager.create_userdjango/contrib/auth/models.py:180254 ms47.7%
UserManager._create_userdjango/contrib/auth/models.py:167253 ms47.5%
UserManager._create_user_objectdjango/contrib/auth/models.py:160253 ms47.5%
make_passworddjango/contrib/auth/hashers.py:118253 ms47.5%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333253 ms47.5%
pbkdf2django/utils/crypto.py:93253 ms47.5%
1 smaller frames hidden
TestUnapproveConference.setUpconfs/tests.py:1295 self.staff = User.objects.create_user("staff", password="pw", is_staff=True)253 ms47.5%
UserManager.create_userdjango/contrib/auth/models.py:180253 ms47.5%
UserManager._create_userdjango/contrib/auth/models.py:167252 ms47.3%
UserManager._create_user_objectdjango/contrib/auth/models.py:160252 ms47.3%
make_passworddjango/contrib/auth/hashers.py:118252 ms47.3%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333252 ms47.3%
pbkdf2django/utils/crypto.py:93252 ms47.3%
1 smaller frames hidden
TestUnapproveConference.test_non_staff_forbiddenconfs/tests.py:1306 self.client.force_login(self.normal)7 ms1.4%
ClientMixin.force_logindjango/test/client.py:8587 ms1.4%
ClientMixin._logindjango/test/client.py:8894 ms0.8%
2 smaller frames hidden
TestUnapproveConference.test_non_staff_forbiddenconfs/tests.py:1307 response = self.client.post(self.url)7 ms1.4%
Client.postdjango/test/client.py:11627 ms1.4%
RequestFactory.postdjango/test/client.py:4997 ms1.4%
RequestFactory.genericdjango/test/client.py:6717 ms1.4%
Client.requestdjango/test/client.py:10917 ms1.4%
ClientHandler.__call__django/test/client.py:1737 ms1.4%
BaseHandler.load_middlewaredjango/core/handlers/base.py:637 ms1.4%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:1047 ms1.4%
WhiteNoise.add_fileswhitenoise/base.py:1087 ms1.4%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1204 ms0.8%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:1313 ms0.6%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1153 ms0.6%
scantreewhitenoise/base.py:2713 ms0.6%
2 smaller frames hidden
Estimated from 500 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
254 ms
confs/tests.py:1295
self.staff = User.objects.create_user("staff", password="pw", is_staff=True)
TestUnapproveConference.setUp · Password hashing
253 ms
confs/tests.py:1306
self.client.force_login(self.normal)
TestUnapproveConference.test_non_staff_forbidden · Database
7 ms
confs/tests.py:1307
response = self.client.post(self.url)
TestUnapproveConference.test_non_staff_forbidden · Libraries
7 ms
fedidevs/db/postgresql/base.py:39
return super().get_new_connection(conn_params)
DatabaseWrapper.get_new_connection · Database
7 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.21 ms
_django_db_marker function 0.03 ms
_template_string_if_invalid_marker function 0.03 ms
_dj_autoclear_mailbox function 0.03 ms
_live_server_helper function 0.02 ms
_django_isolate_apps 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:1296
510 ms
call test body
confs/tests.py:1306
15 ms
setup setUpClass
django/test/testcases.py:1426
7 ms
call _pre_setup
django/test/testcases.py:1167
1 ms

Reliability

14 results · 0 CI failures · 0 local failures

This test hasn't failed recently.

History

Latest 14 results, oldest first in the strip
When Environment Outcome Duration Commit
2 weeks ago CI github-actions:test passed 533 ms 28600ed main Profile
2 weeks, 5 days ago CI github-actions:test passed 669 ms 600b717 main Profile
2 weeks, 6 days ago CI github-actions:test passed 662 ms c28a326 main Profile
3 weeks ago CI github-actions:test passed 439 ms 9b8826a main Profile
3 weeks ago CI github-actions:test passed 646 ms 4f01055 main Profile
1 month ago CI github-actions:test passed 654 ms 8ab642e main Profile
1 month ago CI github-actions:test passed 850 ms 9b75244 main Profile
1 month ago CI github-actions:test passed 644 ms 9603516 main Profile
1 month, 1 week ago CI github-actions:test passed 692 ms 615a272 main Profile
1 month, 1 week ago CI github-actions:test passed 525 ms d923a46 main Profile
1 month, 1 week ago CI github-actions:test passed 809 ms 82997f8 main Profile
1 month, 1 week ago CI github-actions:test passed 683 ms 623aa3e main Profile
1 month, 1 week ago CI github-actions:test passed 1.37 s ab6465a main Profile
1 month, 1 week ago CI github-actions:test passed 638 ms 0c23747 main Run