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

TestEditConference::test_requires_login

First seen 3 weeks ago in 0c23747
CI github-actions:test 11 runs
Average
1.19 s
median 917 ms
max 2.59 s
Phases
Setup 2 ms Call 1.19 s Teardown 0.30 ms
Categories
Password hashing 1.16 s Database 8 ms Factories 0.22 ms Other (Libraries, pytest, Unsampled) 30 ms

9 database queries per run

Needs 12 KB of memory (max 88 KB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, 7 hours ago · open run
Show pytest frames
call908 ms99.9%
TestEditConference.setUpconfs/tests.py:1176 self.other = User.objects.create_user("other", password="pw")302 ms33.2%
UserManager.create_userdjango/contrib/auth/models.py:180302 ms33.2%
UserManager._create_userdjango/contrib/auth/models.py:167301 ms33.1%
UserManager._create_user_objectdjango/contrib/auth/models.py:160301 ms33.1%
make_passworddjango/contrib/auth/hashers.py:118301 ms33.1%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333301 ms33.1%
pbkdf2django/utils/crypto.py:93301 ms33.1%
1 smaller frames hidden
TestEditConference.setUpconfs/tests.py:1175 self.owner = User.objects.create_user("owner", password="pw")299 ms32.8%
UserManager.create_userdjango/contrib/auth/models.py:180299 ms32.8%
UserManager._create_userdjango/contrib/auth/models.py:167297 ms32.7%
UserManager._create_user_objectdjango/contrib/auth/models.py:160297 ms32.7%
make_passworddjango/contrib/auth/hashers.py:118297 ms32.7%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333297 ms32.7%
pbkdf2django/utils/crypto.py:93297 ms32.7%
1 smaller frames hidden
TestEditConference.setUpconfs/tests.py:1177 self.staff = User.objects.create_user("staff", password="pw", is_staff=True)299 ms32.8%
UserManager.create_userdjango/contrib/auth/models.py:180299 ms32.8%
UserManager._create_userdjango/contrib/auth/models.py:167297 ms32.7%
UserManager._create_user_objectdjango/contrib/auth/models.py:160297 ms32.7%
make_passworddjango/contrib/auth/hashers.py:118297 ms32.7%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333297 ms32.7%
pbkdf2django/utils/crypto.py:93297 ms32.7%
1 smaller frames hidden
TestEditConference.test_requires_loginconfs/tests.py:1207 response = self.client.get(self.url)7 ms0.8%
Client.getdjango/test/client.py:11337 ms0.8%
RequestFactory.getdjango/test/client.py:4757 ms0.8%
RequestFactory.genericdjango/test/client.py:6717 ms0.8%
Client.requestdjango/test/client.py:10917 ms0.8%
ClientHandler.__call__django/test/client.py:1737 ms0.8%
BaseHandler.load_middlewaredjango/core/handlers/base.py:637 ms0.8%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:1047 ms0.8%
WhiteNoise.add_fileswhitenoise/base.py:1087 ms0.8%
2 smaller frames hidden
teardown0.25 ms0.0%
Estimated from 873 samples; phase durations are exact. Frames from pytest and pluggy are hidden .

Hot lines in your code

confs/tests.py:1176
self.other = User.objects.create_user("other", password="pw")
TestEditConference.setUp · Password hashing
302 ms
confs/tests.py:1175
self.owner = User.objects.create_user("owner", password="pw")
TestEditConference.setUp · Password hashing
299 ms
confs/tests.py:1177
self.staff = User.objects.create_user("staff", password="pw", is_staff=True)
TestEditConference.setUp · Password hashing
299 ms
confs/tests.py:1207
response = self.client.get(self.url)
TestEditConference.test_requires_login · Libraries
7 ms
confs/tests.py:1178
self.conference = baker.make(
TestEditConference.setUp · Database
1 ms

Fixtures

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

Database

9 queries · 4 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:1176
900 ms
call test body
confs/tests.py:1207
7 ms
call _pre_setup
django/test/testcases.py:1167
1 ms
teardown pytest internals 0.25 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 909 ms c28a326 main Profile
16 hours ago CI github-actions:test passed 609 ms 9b8826a main Profile
22 hours ago CI github-actions:test passed 921 ms 4f01055 main Profile
1 week, 5 days ago CI github-actions:test passed 903 ms 8ab642e main Profile
2 weeks, 2 days ago CI github-actions:test passed 1.33 s 9b75244 main Profile
2 weeks, 2 days ago CI github-actions:test passed 912 ms 9603516 main Profile
2 weeks, 4 days ago CI github-actions:test passed 1.19 s 615a272 main Profile
3 weeks ago CI github-actions:test passed 739 ms d923a46 main Profile
3 weeks ago CI github-actions:test passed 2.12 s 82997f8 main Profile
3 weeks ago CI github-actions:test passed 917 ms 623aa3e main Profile
3 weeks ago CI github-actions:test passed 2.59 s ab6465a main Profile
3 weeks ago CI github-actions:test passed 1.12 s 0c23747 main Run