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

TestConferenceApprovalVisibility::test_other_user_does_not_see_pending

First seen 3 weeks ago in 0c23747
CI github-actions:test 11 runs
Average
1.16 s
median 885 ms
max 2.29 s
Phases
Setup 10 ms Call 1.15 s Teardown 0.30 ms
Categories
Password hashing 1.04 s Database 53 ms Factories 0.74 ms Other (Libraries, Templates, pytest, Unsampled) 67 ms

35 database queries per run

Needs 351 KB of memory (max 1 MB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, 7 hours ago · open run
Show pytest frames
call640 ms99.8%
TestConferenceApprovalVisibility.setUpconfs/tests.py:1316 self.owner = User.objects.create_user("owner", password="pw")301 ms46.9%
UserManager.create_userdjango/contrib/auth/models.py:180301 ms46.9%
UserManager._create_userdjango/contrib/auth/models.py:167301 ms46.9%
UserManager._create_user_objectdjango/contrib/auth/models.py:160301 ms46.9%
make_passworddjango/contrib/auth/hashers.py:118301 ms46.9%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333301 ms46.9%
pbkdf2django/utils/crypto.py:93301 ms46.9%
TestConferenceApprovalVisibility.setUpconfs/tests.py:1317 self.other = User.objects.create_user("other", password="pw")298 ms46.5%
UserManager.create_userdjango/contrib/auth/models.py:180298 ms46.5%
UserManager._create_userdjango/contrib/auth/models.py:167297 ms46.3%
UserManager._create_user_objectdjango/contrib/auth/models.py:160297 ms46.3%
make_passworddjango/contrib/auth/hashers.py:118297 ms46.3%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333297 ms46.3%
pbkdf2django/utils/crypto.py:93297 ms46.3%
1 smaller frames hidden
TestConferenceApprovalVisibility.test_other_user_does_not_see_pendingconfs/tests.py:1349 response = self.client.get(reverse("conferences"))34 ms5.3%
Client.getdjango/test/client.py:113334 ms5.3%
RequestFactory.getdjango/test/client.py:47534 ms5.3%
RequestFactory.genericdjango/test/client.py:67134 ms5.3%
Client.requestdjango/test/client.py:109134 ms5.3%
ClientHandler.__call__django/test/client.py:18624 ms3.8%
BaseHandler.get_responsedjango/core/handlers/base.py:14224 ms3.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5624 ms3.8%
MiddlewareMixin.__call__django/utils/deprecation.py:38024 ms3.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5624 ms3.8%
MiddlewareMixin.__call__django/utils/deprecation.py:38024 ms3.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5624 ms3.8%
MiddlewareMixin.__call__django/utils/deprecation.py:38024 ms3.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5624 ms3.8%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:12324 ms3.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5624 ms3.8%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:14524 ms3.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5624 ms3.8%
MiddlewareMixin.__call__django/utils/deprecation.py:38024 ms3.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5624 ms3.8%
MiddlewareMixin.__call__django/utils/deprecation.py:38024 ms3.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5624 ms3.8%
MiddlewareMixin.__call__django/utils/deprecation.py:38024 ms3.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5624 ms3.8%
MiddlewareMixin.__call__django/utils/deprecation.py:38024 ms3.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5624 ms3.8%
MiddlewareMixin.__call__django/utils/deprecation.py:38024 ms3.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5624 ms3.8%
MiddlewareMixin.__call__django/utils/deprecation.py:38024 ms3.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5624 ms3.8%
MiddlewareMixin.__call__django/utils/deprecation.py:38024 ms3.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5624 ms3.8%
BaseHandler._get_responsedjango/core/handlers/base.py:19924 ms3.8%
conferencesconfs/views.py:128 return render(24 ms3.8%
renderdjango/shortcuts.py:2724 ms3.8%
render_to_stringdjango/template/loader.py:6224 ms3.8%
Template.renderdjango/template/backends/django.py:10724 ms3.8%
Template.renderdjango/template/base.py:17524 ms3.8%
instrumented_test_renderdjango/test/utils.py:11324 ms3.8%
NodeList.renderdjango/template/base.py:110824 ms3.8%
Node.render_annotateddjango/template/base.py:106924 ms3.8%
ExtendsNode.renderdjango/template/loader_tags.py:16024 ms3.8%
instrumented_test_renderdjango/test/utils.py:11324 ms3.8%
NodeList.renderdjango/template/base.py:110824 ms3.8%
Node.render_annotateddjango/template/base.py:106924 ms3.8%
IfNode.renderdjango/template/defaulttags.py:33321 ms3.3%
NodeList.renderdjango/template/base.py:110821 ms3.3%
Node.render_annotateddjango/template/base.py:106921 ms3.3%
VariableNode.renderdjango/template/base.py:116721 ms3.3%
FilterExpression.resolvedjango/template/base.py:80621 ms3.3%
Variable.resolvedjango/template/base.py:94521 ms3.3%
Variable._resolve_lookupdjango/template/base.py:99321 ms3.3%
new_method_proxy.<locals>.innerdjango/utils/functional.py:25321 ms3.3%
ReverseOneToOneDescriptor.__get__django/db/models/fields/related_descriptors.py:53721 ms3.3%
FetchOne.fetchdjango/db/models/fetch_modes.py:1721 ms3.3%
ReverseOneToOneDescriptor.fetch_onedjango/db/models/fields/related_descriptors.py:56221 ms3.3%
QuerySet.getdjango/db/models/query.py:70221 ms3.3%
QuerySet.__len__django/db/models/query.py:42121 ms3.3%
QuerySet._fetch_alldjango/db/models/query.py:226221 ms3.3%
ModelIterable.__iter__django/db/models/query.py:10321 ms3.3%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:162521 ms3.3%
CursorWrapper.executedjango/db/backends/utils.py:7921 ms3.3%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:9221 ms3.3%
CursorWrapper._executedjango/db/backends/utils.py:10521 ms3.3%
Cursor.executepsycopg/cursor.py:11321 ms3.3%
Connection.waitpsycopg/connection.py:49521 ms3.3%
1 smaller frames hidden
ClientHandler.__call__django/test/client.py:17310 ms1.5%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6310 ms1.5%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10410 ms1.5%
WhiteNoise.add_fileswhitenoise/base.py:10810 ms1.5%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1207 ms1.2%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:1317 ms1.2%
WhiteNoise.get_static_filewhitenoise/base.py:2175 ms0.8%
1 smaller frames hidden
1 smaller frames hidden
TestConferenceApprovalVisibility.test_other_user_does_not_see_pendingconfs/tests.py:1348 self.client.force_login(self.other)6 ms1.0%
ClientMixin.force_logindjango/test/client.py:8586 ms1.0%
ClientMixin._logindjango/test/client.py:8895 ms0.8%
1 smaller frames hidden
1 smaller frames hidden
Estimated from 604 samples; phase durations are exact. Frames from pytest and pluggy are hidden .

Hot lines in your code

confs/tests.py:1316
self.owner = User.objects.create_user("owner", password="pw")
TestConferenceApprovalVisibility.setUp · Password hashing
301 ms
confs/tests.py:1317
self.other = User.objects.create_user("other", password="pw")
TestConferenceApprovalVisibility.setUp · Password hashing
298 ms
confs/views.py:128
return render(
conferences · Database
24 ms
confs/tests.py:1349
response = self.client.get(reverse("conferences"))
TestConferenceApprovalVisibility.test_other_user_does_not_see_pending · Libraries
10 ms
confs/tests.py:1348
self.client.force_login(self.other)
TestConferenceApprovalVisibility.test_other_user_does_not_see_pending · Database
6 ms
confs/tests.py:1318
self.approved = baker.make(
TestConferenceApprovalVisibility.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
_django_isolate_apps function 0.03 ms
_django_set_urlconf function 0.03 ms
_live_server_helper function 0.03 ms
_django_clear_site_cache function 0.02 ms
monkeypatch function 0.02 ms

Database

35 queries · 14 ms

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

3×
SELECT "confs_conference"."id", "confs_conference"."name", "confs_conference"."slug", "confs_conference"."location", "confs_conference"."start_date", "confs_conference"."end_date", "confs_conference"."time_zone", "confs_conference"."archived_date", "confs_conference"."approved_at", "confs_conferenc…

Biggest pieces of work

call setUp
confs/tests.py:1316
600 ms
call test body
confs/tests.py:1349
40 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 641 ms c28a326 main Profile
16 hours ago CI github-actions:test passed 436 ms 9b8826a main Profile
22 hours ago CI github-actions:test passed 674 ms 4f01055 main Profile
1 week, 5 days ago CI github-actions:test passed 666 ms 8ab642e main Profile
2 weeks, 2 days ago CI github-actions:test passed 662 ms 9b75244 main Profile
2 weeks, 2 days ago CI github-actions:test passed 1.55 s 9603516 main Profile
2 weeks, 4 days ago CI github-actions:test passed 1.02 s 615a272 main Profile
3 weeks ago CI github-actions:test passed 885 ms d923a46 main Profile
3 weeks ago CI github-actions:test passed 1.72 s 82997f8 main Profile
3 weeks ago CI github-actions:test passed 2.23 s 623aa3e main Profile
3 weeks ago CI github-actions:test passed 2.29 s ab6465a main Profile
3 weeks ago CI github-actions:test passed 1.00 s 0c23747 main Run