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

TestEditConference::test_owner_can_edit

First seen 3 weeks ago in 0c23747
CI github-actions:test 11 runs
Average
1.69 s
median 1.60 s
max 3.46 s
Phases
Setup 2 ms Call 1.69 s Teardown 0.40 ms
Categories
Password hashing 1.59 s Database 33 ms Factories 0.52 ms App code 0.27 ms Other (Libraries, Deep copies, pytest, Unsampled, ...) 71 ms

31 database queries per run

Needs 2 KB of memory (max 8 KB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, 7 hours ago · open run
Show pytest frames
call1.76 s99.9%
TestEditConference.setUpconfs/tests.py:1177 self.staff = User.objects.create_user("staff", password="pw", is_staff=True)612 ms34.7%
UserManager.create_userdjango/contrib/auth/models.py:180612 ms34.7%
UserManager._create_userdjango/contrib/auth/models.py:167611 ms34.7%
UserManager._create_user_objectdjango/contrib/auth/models.py:160611 ms34.7%
make_passworddjango/contrib/auth/hashers.py:118611 ms34.7%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333611 ms34.7%
pbkdf2django/utils/crypto.py:93611 ms34.7%
1 smaller frames hidden
TestEditConference.setUpconfs/tests.py:1175 self.owner = User.objects.create_user("owner", password="pw")589 ms33.4%
UserManager.create_userdjango/contrib/auth/models.py:180589 ms33.4%
UserManager._create_userdjango/contrib/auth/models.py:167588 ms33.3%
UserManager._create_user_objectdjango/contrib/auth/models.py:160588 ms33.3%
make_passworddjango/contrib/auth/hashers.py:118588 ms33.3%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333588 ms33.3%
pbkdf2django/utils/crypto.py:93588 ms33.3%
1 smaller frames hidden
TestEditConference.setUpconfs/tests.py:1176 self.other = User.objects.create_user("other", password="pw")508 ms28.8%
UserManager.create_userdjango/contrib/auth/models.py:180508 ms28.8%
UserManager._create_userdjango/contrib/auth/models.py:167503 ms28.5%
UserManager._create_user_objectdjango/contrib/auth/models.py:160503 ms28.5%
make_passworddjango/contrib/auth/hashers.py:118503 ms28.5%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333503 ms28.5%
pbkdf2django/utils/crypto.py:93503 ms28.5%
1 smaller frames hidden
TestEditConference.test_owner_can_editconfs/tests.py:1219 response = self.client.post(self.url, self._post_data())24 ms1.3%
Client.postdjango/test/client.py:116224 ms1.3%
RequestFactory.postdjango/test/client.py:49924 ms1.3%
RequestFactory.genericdjango/test/client.py:67124 ms1.3%
Client.requestdjango/test/client.py:109124 ms1.3%
ClientHandler.__call__django/test/client.py:17324 ms1.3%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6324 ms1.3%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10423 ms1.3%
WhiteNoise.add_fileswhitenoise/base.py:10823 ms1.3%
1 smaller frames hidden
TransactionTestCase._post_teardowndjango/test/testcases.py:1243 self._fixture_teardown()16 ms0.9%
TestCase._fixture_teardowndjango/test/testcases.py:150012 ms0.7%
TestCase._rollback_atomicsdjango/test/testcases.py:140812 ms0.7%
Atomic.__exit__django/db/transaction.py:2959 ms0.5%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:269 ms0.5%
BaseDatabaseWrapper.savepoint_rollbackdjango/db/backends/base/base.py:4139 ms0.5%
1 smaller frames hidden
1 smaller frames hidden
3 smaller frames hidden
Estimated from 1,718 samples; phase durations are exact. Frames from pytest and pluggy are hidden .

Hot lines in your code

confs/tests.py:1177
self.staff = User.objects.create_user("staff", password="pw", is_staff=True)
TestEditConference.setUp · Password hashing
612 ms
confs/tests.py:1175
self.owner = User.objects.create_user("owner", password="pw")
TestEditConference.setUp · Password hashing
589 ms
confs/tests.py:1176
self.other = User.objects.create_user("other", password="pw")
TestEditConference.setUp · Password hashing
508 ms
confs/tests.py:1219
response = self.client.post(self.url, self._post_data())
TestEditConference.test_owner_can_edit · Libraries
24 ms
confs/tests.py:1218
self.client.force_login(self.owner)
TestEditConference.test_owner_can_edit · Database
6 ms
confs/tests.py:1178
self.conference = baker.make(
TestEditConference.setUp · Database
3 ms

Fixtures

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

Database

31 queries · 19 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:1177
1.71 s
call test body
confs/tests.py:1219
30 ms
call _post_teardown
django/test/testcases.py:1243
16 ms
call _pre_setup
django/test/testcases.py:1167
3 ms
call 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.76 s c28a326 main Profile
16 hours ago CI github-actions:test passed 790 ms 9b8826a main Profile
22 hours ago CI github-actions:test passed 1.60 s 4f01055 main Profile
1 week, 5 days ago CI github-actions:test passed 1.56 s 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 1.60 s 9603516 main Profile
2 weeks, 4 days ago CI github-actions:test passed 1.45 s 615a272 main Profile
3 weeks ago CI github-actions:test passed 1.11 s d923a46 main Profile
3 weeks ago CI github-actions:test passed 2.08 s 82997f8 main Profile
3 weeks ago CI github-actions:test passed 3.46 s 623aa3e main Profile
3 weeks ago CI github-actions:test passed 1.85 s ab6465a main Profile
3 weeks ago CI github-actions:test passed 1.34 s 0c23747 main Run