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

TestEditConference::test_owner_can_edit

First seen 1 month, 1 week ago in 0c23747
CI github-actions:test 13 runs
Average
1.62 s
median 1.56 s
max 3.46 s
Phases
Setup 2 ms Call 1.62 s Teardown 0.38 ms
Categories
Password hashing 1.52 s Database 37 ms Factories 0.52 ms App code 0.23 ms Test code 0.08 ms Other (Libraries, pytest, Deep copies, Unsampled, ...) 64 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, 2 weeks ago · open run
Show pytest frames
call912 ms99.9%
TestEditConference.setUpconfs/tests.py:1177 self.staff = User.objects.create_user("staff", password="pw", is_staff=True)309 ms33.8%
UserManager.create_userdjango/contrib/auth/models.py:180309 ms33.8%
UserManager._create_userdjango/contrib/auth/models.py:167308 ms33.7%
UserManager._create_user_objectdjango/contrib/auth/models.py:160308 ms33.7%
make_passworddjango/contrib/auth/hashers.py:118308 ms33.7%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333308 ms33.7%
pbkdf2django/utils/crypto.py:93308 ms33.7%
1 smaller frames hidden
TestEditConference.setUpconfs/tests.py:1175 self.owner = User.objects.create_user("owner", password="pw")281 ms30.8%
UserManager.create_userdjango/contrib/auth/models.py:180281 ms30.8%
UserManager._create_userdjango/contrib/auth/models.py:167280 ms30.7%
UserManager._create_user_objectdjango/contrib/auth/models.py:160280 ms30.7%
make_passworddjango/contrib/auth/hashers.py:118280 ms30.7%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333280 ms30.7%
pbkdf2django/utils/crypto.py:93280 ms30.7%
1 smaller frames hidden
TestEditConference.setUpconfs/tests.py:1176 self.other = User.objects.create_user("other", password="pw")272 ms29.8%
UserManager.create_userdjango/contrib/auth/models.py:180272 ms29.8%
UserManager._create_userdjango/contrib/auth/models.py:167272 ms29.8%
UserManager._create_user_objectdjango/contrib/auth/models.py:160272 ms29.8%
make_passworddjango/contrib/auth/hashers.py:118272 ms29.8%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333272 ms29.8%
pbkdf2django/utils/crypto.py:93272 ms29.8%
TestEditConference.test_owner_can_editconfs/tests.py:1219 response = self.client.post(self.url, self._post_data())37 ms4.0%
Client.postdjango/test/client.py:116237 ms4.0%
RequestFactory.postdjango/test/client.py:49937 ms4.0%
RequestFactory.genericdjango/test/client.py:67137 ms4.0%
Client.requestdjango/test/client.py:109137 ms4.0%
ClientHandler.__call__django/test/client.py:17337 ms4.0%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6337 ms4.0%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10437 ms4.0%
WhiteNoise.add_fileswhitenoise/base.py:10837 ms4.0%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12032 ms3.5%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:13132 ms3.5%
WhiteNoise.get_static_filewhitenoise/base.py:21721 ms2.3%
StaticFile.__init__whitenoise/responders.py:777 ms0.8%
StaticFile.__init__whitenoise/responders.py:737 ms0.8%
3 smaller frames hidden
WhiteNoise.get_static_filewhitenoise/base.py:2126 ms0.7%
WhiteNoise.add_cache_headerswhitenoise/base.py:2335 ms0.6%
WhiteNoiseMiddleware.immutable_file_testwhitenoise/middleware.py:1765 ms0.6%
WhiteNoiseMiddleware.get_static_urlwhitenoise/middleware.py:1975 ms0.6%
URLMixin.urldebug_toolbar/panels/staticfiles.py:205 ms0.6%
HashedFilesMixin.urldjango/contrib/staticfiles/storage.py:2355 ms0.6%
1 smaller frames hidden
2 smaller frames hidden
WhiteNoise.update_files_dictionarywhitenoise/base.py:1155 ms0.6%
scantreewhitenoise/base.py:2715 ms0.6%
TestEditConference.test_owner_can_editconfs/tests.py:1218 self.client.force_login(self.owner)8 ms0.9%
ClientMixin.force_logindjango/test/client.py:8588 ms0.9%
2 smaller frames hidden
Estimated from 895 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
309 ms
confs/tests.py:1175
self.owner = User.objects.create_user("owner", password="pw")
TestEditConference.setUp · Password hashing
281 ms
confs/tests.py:1176
self.other = User.objects.create_user("other", password="pw")
TestEditConference.setUp · Password hashing
272 ms
confs/tests.py:1219
response = self.client.post(self.url, self._post_data())
TestEditConference.test_owner_can_edit · Libraries
37 ms
confs/tests.py:1218
self.client.force_login(self.owner)
TestEditConference.test_owner_can_edit · Database
8 ms
confs/tests.py:1178
self.conference = baker.make(
TestEditConference.setUp · Database
3 ms
confs/tests.py:1217
def test_owner_can_edit(self):
TestEditConference.test_owner_can_edit · Test code
1 ms

Fixtures

Exact setup time
_dj_autoclear_mailbox function 0.05 ms
_template_string_if_invalid_marker function 0.04 ms
_django_db_marker function 0.03 ms
_django_isolate_apps function 0.03 ms
_live_server_helper 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

31 queries · 13 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
865 ms
call test body
confs/tests.py:1219
46 ms
call pytest internals 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 913 ms 28600ed main Profile
2 weeks, 5 days ago CI github-actions:test passed 1.52 s 600b717 main Profile
2 weeks, 6 days ago CI github-actions:test passed 1.76 s c28a326 main Profile
3 weeks ago CI github-actions:test passed 790 ms 9b8826a main Profile
3 weeks ago CI github-actions:test passed 1.60 s 4f01055 main Profile
1 month ago CI github-actions:test passed 1.56 s 8ab642e main Profile
1 month ago CI github-actions:test passed 1.33 s 9b75244 main Profile
1 month ago CI github-actions:test passed 1.60 s 9603516 main Profile
1 month, 1 week ago CI github-actions:test passed 1.45 s 615a272 main Profile
1 month, 1 week ago CI github-actions:test passed 1.11 s d923a46 main Profile
1 month, 1 week ago CI github-actions:test passed 2.08 s 82997f8 main Profile
1 month, 1 week ago CI github-actions:test passed 3.46 s 623aa3e main Profile
1 month, 1 week ago CI github-actions:test passed 1.85 s ab6465a main Profile
1 month, 1 week ago CI github-actions:test passed 1.34 s 0c23747 main Run