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

TestEditConference::test_other_user_forbidden

First seen 3 weeks ago in 0c23747
CI github-actions:test 11 runs
Average
1.73 s
median 1.58 s
max 2.71 s
Phases
Setup 2 ms Call 1.73 s Teardown 0.83 ms
Categories
Password hashing 1.64 s Database 28 ms Factories 0.32 ms Test code 0.09 ms Other (Libraries, pytest, Unsampled, Logging, ...) 58 ms

27 database queries per run

Needs 16 KB of memory (max 68 KB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, 7 hours ago · open run
Show pytest frames
setup3 ms0.2%
call1.58 s99.8%
TestEditConference.setUpconfs/tests.py:1175 self.owner = User.objects.create_user("owner", password="pw")651 ms41.1%
UserManager.create_userdjango/contrib/auth/models.py:180651 ms41.1%
UserManager._create_userdjango/contrib/auth/models.py:167649 ms41.0%
UserManager._create_user_objectdjango/contrib/auth/models.py:160649 ms41.0%
make_passworddjango/contrib/auth/hashers.py:118649 ms41.0%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333649 ms41.0%
pbkdf2django/utils/crypto.py:93649 ms41.0%
1 smaller frames hidden
TestEditConference.setUpconfs/tests.py:1177 self.staff = User.objects.create_user("staff", password="pw", is_staff=True)461 ms29.1%
UserManager.create_userdjango/contrib/auth/models.py:180461 ms29.1%
UserManager._create_userdjango/contrib/auth/models.py:167460 ms29.1%
UserManager._create_user_objectdjango/contrib/auth/models.py:160460 ms29.1%
make_passworddjango/contrib/auth/hashers.py:118460 ms29.1%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333460 ms29.1%
pbkdf2django/utils/crypto.py:93460 ms29.1%
1 smaller frames hidden
TestEditConference.setUpconfs/tests.py:1176 self.other = User.objects.create_user("other", password="pw")439 ms27.7%
UserManager.create_userdjango/contrib/auth/models.py:180439 ms27.7%
UserManager._create_userdjango/contrib/auth/models.py:167437 ms27.6%
UserManager._create_user_objectdjango/contrib/auth/models.py:160437 ms27.6%
make_passworddjango/contrib/auth/hashers.py:118437 ms27.6%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333437 ms27.6%
pbkdf2django/utils/crypto.py:93437 ms27.6%
1 smaller frames hidden
TestEditConference.test_other_user_forbiddenconfs/tests.py:1235 self.client.force_login(self.other)14 ms0.9%
ClientMixin.force_logindjango/test/client.py:85814 ms0.9%
TestEditConference.test_other_user_forbiddenconfs/tests.py:1236 response = self.client.get(self.url)11 ms0.7%
Client.getdjango/test/client.py:113311 ms0.7%
RequestFactory.getdjango/test/client.py:47511 ms0.7%
RequestFactory.genericdjango/test/client.py:67111 ms0.7%
Client.requestdjango/test/client.py:109111 ms0.7%
ClientHandler.__call__django/test/client.py:17311 ms0.7%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6311 ms0.7%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10411 ms0.7%
WhiteNoise.add_fileswhitenoise/base.py:10811 ms0.7%
2 smaller frames hidden
Estimated from 1,496 samples; phase durations are exact. Frames from pytest and pluggy are hidden .

Hot lines in your code

confs/tests.py:1175
self.owner = User.objects.create_user("owner", password="pw")
TestEditConference.setUp · Password hashing
651 ms
confs/tests.py:1177
self.staff = User.objects.create_user("staff", password="pw", is_staff=True)
TestEditConference.setUp · Password hashing
461 ms
confs/tests.py:1176
self.other = User.objects.create_user("other", password="pw")
TestEditConference.setUp · Password hashing
439 ms
confs/tests.py:1235
self.client.force_login(self.other)
TestEditConference.test_other_user_forbidden · Database
14 ms
confs/tests.py:1236
response = self.client.get(self.url)
TestEditConference.test_other_user_forbidden · Libraries
11 ms
confs/tests.py:1178
self.conference = baker.make(
TestEditConference.setUp · Database
1 ms

Fixtures

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

Database

27 queries · 29 ms

Repeated queries are usually N+1 lookups: fetch them once with select_related / prefetch_related (or selectinload).

3×
INSERT INTO "auth_user" ("password", "last_login", "is_superuser", "username", "first_name", "last_name", "email", "is_staff", "is_active", "date_joined") VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s) RETURNING "auth_user"."id"

Biggest pieces of work

call setUp
confs/tests.py:1175
1.55 s
call test body
confs/tests.py:1235
24 ms
call _pre_setup
django/test/testcases.py:1167
3 ms
setup __init__
__init__:-1
2 ms
setup pytest internals 1 ms

Reliability

12 results · 0 CI failures · 0 local failures

This test hasn't failed recently.

History

Latest 12 results, oldest first in the strip
When Environment Outcome Duration Commit
7 hours ago CI github-actions:test passed 1.58 s c28a326 main Profile
16 hours ago CI github-actions:test passed 994 ms 9b8826a main Profile
22 hours ago CI github-actions:test passed 1.78 s 4f01055 main Profile
1 week, 5 days ago CI github-actions:test passed 1.62 s 8ab642e main Profile
2 weeks, 2 days ago CI github-actions:test passed 1.35 s 9b75244 main Profile
2 weeks, 2 days ago CI github-actions:test passed 1.48 s 9603516 main Profile
2 weeks, 4 days ago CI github-actions:test passed 1.40 s 615a272 main Profile
3 weeks ago CI github-actions:test passed 1.13 s d923a46 main Profile
3 weeks ago CI github-actions:test passed 2.71 s 82997f8 main Profile
3 weeks ago CI github-actions:test passed 2.65 s 623aa3e main Profile
3 weeks ago CI github-actions:test passed 2.34 s ab6465a main Profile
3 weeks ago CI github-actions:test passed 1.34 s 0c23747 main Run