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

TestApproveConference::test_non_staff_forbidden

First seen 12 hours ago in 0c23747
CI github-actions:test 4 runs
Average
1.69 s
median 1.88 s
max 2.23 s
Phases
Setup 3 ms Call 1.69 s Teardown 0.38 ms
Categories
Password hashing 1.55 s Database 26 ms Factories 2 ms Other (Libraries, pytest, Unsampled, Logging) 119 ms

26 database queries per run

Needs 227 KB of memory (max 724 KB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, 7 hours ago · open run
Show pytest frames
call789 ms99.8%
TestApproveConference.setUpconfs/tests.py:1372 self.normal = User.objects.create_user("bob", password="pw")392 ms49.6%
UserManager.create_userdjango/contrib/auth/models.py:180392 ms49.6%
UserManager._create_userdjango/contrib/auth/models.py:167391 ms49.5%
UserManager._create_user_objectdjango/contrib/auth/models.py:160391 ms49.5%
make_passworddjango/contrib/auth/hashers.py:118391 ms49.5%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333391 ms49.5%
pbkdf2django/utils/crypto.py:93391 ms49.5%
1 smaller frames hidden
TestApproveConference.setUpconfs/tests.py:1371 self.staff = User.objects.create_user("staff", password="pw", is_staff=True)358 ms45.3%
UserManager.create_userdjango/contrib/auth/models.py:180358 ms45.3%
UserManager._create_userdjango/contrib/auth/models.py:167357 ms45.1%
UserManager._create_user_objectdjango/contrib/auth/models.py:160357 ms45.1%
make_passworddjango/contrib/auth/hashers.py:118357 ms45.1%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333357 ms45.1%
pbkdf2django/utils/crypto.py:93357 ms45.1%
1 smaller frames hidden
TestApproveConference.test_non_staff_forbiddenconfs/tests.py:1377 response = self.client.post(self.url)28 ms3.5%
Client.postdjango/test/client.py:116228 ms3.5%
RequestFactory.postdjango/test/client.py:49928 ms3.5%
RequestFactory.genericdjango/test/client.py:67128 ms3.5%
Client.requestdjango/test/client.py:109128 ms3.5%
ClientHandler.__call__django/test/client.py:17325 ms3.1%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6325 ms3.1%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10425 ms3.1%
WhiteNoise.add_fileswhitenoise/base.py:10825 ms3.1%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12019 ms2.4%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:13117 ms2.1%
WhiteNoise.get_static_filewhitenoise/base.py:21713 ms1.7%
StaticFile.__init__whitenoise/responders.py:734 ms0.5%
5 smaller frames hidden
2 smaller frames hidden
1 smaller frames hidden
WhiteNoise.update_files_dictionarywhitenoise/base.py:1155 ms0.7%
scantreewhitenoise/base.py:2714 ms0.5%
1 smaller frames hidden
1 smaller frames hidden
TestApproveConference.test_non_staff_forbiddenconfs/tests.py:1376 self.client.force_login(self.normal)8 ms1.0%
ClientMixin.force_logindjango/test/client.py:8588 ms1.0%
ClientMixin._logindjango/test/client.py:8895 ms0.7%
1 smaller frames hidden
3 smaller frames hidden
Estimated from 761 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
392 ms
confs/tests.py:1371
self.staff = User.objects.create_user("staff", password="pw", is_staff=True)
TestApproveConference.setUp · Password hashing
358 ms
confs/tests.py:1377
response = self.client.post(self.url)
TestApproveConference.test_non_staff_forbidden · Libraries
28 ms
confs/tests.py:1376
self.client.force_login(self.normal)
TestApproveConference.test_non_staff_forbidden · Database
8 ms
confs/tests.py:1370
self.conference = baker.make(Conference, approved_at=None, tags="tag1")
TestApproveConference.setUp · Database
1 ms
confs/tests.py:1379
self.conference.refresh_from_db()
TestApproveConference.test_non_staff_forbidden · Database
1 ms

Fixtures

Exact setup time
_dj_autoclear_mailbox function 0.05 ms
_template_string_if_invalid_marker function 0.03 ms
_django_isolate_apps function 0.03 ms
_django_db_marker function 0.03 ms
_live_server_helper function 0.03 ms
_django_set_urlconf function 0.02 ms
_django_clear_site_cache function 0.02 ms
monkeypatch function 0.02 ms

Database

26 queries · 8 ms
No repeated queries.

Biggest pieces of work

call setUp
confs/tests.py:1372
750 ms
call test body
confs/tests.py:1377
37 ms
call _post_teardown
django/test/testcases.py:1243
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 790 ms d923a46 main Profile
7 hours ago CI github-actions:test passed 1.73 s 82997f8 main Profile
7 hours ago CI github-actions:test passed 2.02 s 623aa3e main Profile
12 hours ago CI github-actions:test passed 2.23 s ab6465a main Profile
12 hours ago CI github-actions:test passed 968 ms 0c23747 main Run