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

TestSelectedInstance::test_no_selected_instance

First seen 2 years, 10 months ago in 1cd3a8d
CI github-actions:test 4 runs
Average
200 ms
median 173 ms
max 385 ms
Phases
Setup 2 ms Call 198 ms Teardown 0.33 ms
Categories
Database 22 ms Other (Libraries, Templates, pytest, Unsampled) 178 ms

12 database queries per run

Needs 1 MB 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
call68 ms98.2%
TestSelectedInstance.test_no_selected_instanceaccounts/tests.py:157 response = self.client.get("/?q=")60 ms86.4%
Client.getdjango/test/client.py:113360 ms86.4%
RequestFactory.getdjango/test/client.py:47560 ms86.4%
RequestFactory.genericdjango/test/client.py:67160 ms86.4%
Client.requestdjango/test/client.py:109160 ms86.4%
ClientHandler.__call__django/test/client.py:17330 ms43.2%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6330 ms43.2%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10430 ms43.2%
WhiteNoise.add_fileswhitenoise/base.py:10830 ms43.2%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12019 ms27.5%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:13119 ms27.5%
WhiteNoise.get_static_filewhitenoise/base.py:21716 ms23.6%
StaticFile.__init__whitenoise/responders.py:7311 ms15.7%
StaticFile.get_headerswhitenoise/responders.py:1765 ms7.9%
StaticFile.get_headerswhitenoise/responders.py:1673 ms3.9%
StaticFile.get_headerswhitenoise/responders.py:1703 ms3.9%
StaticFile.__init__whitenoise/responders.py:775 ms7.9%
StaticFile.get_alternativeswhitenoise/responders.py:2003 ms3.9%
__init____init__:-13 ms3.9%
Headers.__init__<stdlib>/wsgiref/headers.py:433 ms3.9%
StaticFile.get_alternativeswhitenoise/responders.py:2013 ms3.9%
WhiteNoise.get_static_filewhitenoise/base.py:2113 ms3.9%
WhiteNoise.add_mime_headerswhitenoise/base.py:2303 ms3.9%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1158 ms11.8%
scantreewhitenoise/base.py:2718 ms11.8%
scantreewhitenoise/base.py:2715 ms7.9%
scantreewhitenoise/base.py:2713 ms3.9%
scantreewhitenoise/base.py:2713 ms3.9%
scantreewhitenoise/base.py:2713 ms3.9%
scantreewhitenoise/base.py:2693 ms3.9%
scantreewhitenoise/base.py:2733 ms3.9%
scantreewhitenoise/base.py:2733 ms3.9%
ClientHandler.__call__django/test/client.py:18630 ms43.2%
BaseHandler.get_responsedjango/core/handlers/base.py:14230 ms43.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5630 ms43.2%
MiddlewareMixin.__call__django/utils/deprecation.py:38030 ms43.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5630 ms43.2%
MiddlewareMixin.__call__django/utils/deprecation.py:38030 ms43.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5630 ms43.2%
MiddlewareMixin.__call__django/utils/deprecation.py:38030 ms43.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5630 ms43.2%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:12330 ms43.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5630 ms43.2%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:14530 ms43.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5630 ms43.2%
MiddlewareMixin.__call__django/utils/deprecation.py:38030 ms43.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5630 ms43.2%
MiddlewareMixin.__call__django/utils/deprecation.py:38030 ms43.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5630 ms43.2%
MiddlewareMixin.__call__django/utils/deprecation.py:38030 ms43.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5630 ms43.2%
MiddlewareMixin.__call__django/utils/deprecation.py:38030 ms43.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5630 ms43.2%
MiddlewareMixin.__call__django/utils/deprecation.py:38030 ms43.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5630 ms43.2%
MiddlewareMixin.__call__django/utils/deprecation.py:38030 ms43.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5630 ms43.2%
MiddlewareMixin.__call__django/utils/deprecation.py:38030 ms43.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5630 ms43.2%
BaseHandler._get_responsedjango/core/handlers/base.py:19930 ms43.2%
indexaccounts/views.py:425 return render(16 ms23.6%
renderdjango/shortcuts.py:2716 ms23.6%
render_to_stringdjango/template/loader.py:6216 ms23.6%
Template.renderdjango/template/backends/django.py:10716 ms23.6%
Template.renderdjango/template/base.py:17516 ms23.6%
instrumented_test_renderdjango/test/utils.py:11314 ms19.6%
NodeList.renderdjango/template/base.py:110814 ms19.6%
Node.render_annotateddjango/template/base.py:106914 ms19.6%
ExtendsNode.renderdjango/template/loader_tags.py:16014 ms19.6%
instrumented_test_renderdjango/test/utils.py:11314 ms19.6%
NodeList.renderdjango/template/base.py:110814 ms19.6%
Node.render_annotateddjango/template/base.py:106914 ms19.6%
BlockNode.renderdjango/template/loader_tags.py:6611 ms15.7%
NodeList.renderdjango/template/base.py:110811 ms15.7%
Node.render_annotateddjango/template/base.py:106911 ms15.7%
ForNode.renderdjango/template/defaulttags.py:24911 ms15.7%
Node.render_annotateddjango/template/base.py:106911 ms15.7%
IfNode.renderdjango/template/defaulttags.py:3338 ms11.8%
NodeList.renderdjango/template/base.py:11088 ms11.8%
Node.render_annotateddjango/template/base.py:10698 ms11.8%
URLNode.renderdjango/template/defaulttags.py:5115 ms7.9%
URLNode.renderdjango/template/defaulttags.py:5213 ms3.9%
reversedjango/urls/base.py:983 ms3.9%
IfNode.renderdjango/template/defaulttags.py:3263 ms3.9%
infix.<locals>.Operator.evaldjango/template/smartif.py:613 ms3.9%
<lambda>django/template/smartif.py:1073 ms3.9%
TemplateLiteral.evaldjango/template/defaulttags.py:9183 ms3.9%
FilterExpression.resolvedjango/template/base.py:8063 ms3.9%
Variable.resolvedjango/template/base.py:9453 ms3.9%
Variable._resolve_lookupdjango/template/base.py:9993 ms3.9%
IfNode.renderdjango/template/defaulttags.py:3333 ms3.9%
NodeList.renderdjango/template/base.py:11083 ms3.9%
Node.render_annotateddjango/template/base.py:10693 ms3.9%
IncludeNode.renderdjango/template/loader_tags.py:2113 ms3.9%
Template.renderdjango/template/base.py:1773 ms3.9%
instrumented_test_renderdjango/test/utils.py:1133 ms3.9%
NodeList.renderdjango/template/base.py:11083 ms3.9%
Node.render_annotateddjango/template/base.py:10693 ms3.9%
SimpleNode.renderdjango/template/library.py:3433 ms3.9%
instances_datalistaccounts/templatetags/account_extras.py:36 for instance in instances:3 ms3.9%
QuerySet.__iter__django/db/models/query.py:4393 ms3.9%
QuerySet._fetch_alldjango/db/models/query.py:22623 ms3.9%
FlatValuesListIterable.__iter__django/db/models/query.py:3023 ms3.9%
SQLCompiler.results_iterdjango/db/models/sql/compiler.py:15743 ms3.9%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16253 ms3.9%
CursorWrapper.executedjango/db/backends/utils.py:793 ms3.9%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:923 ms3.9%
CursorWrapper._executedjango/db/backends/utils.py:1053 ms3.9%
Cursor.executepsycopg/cursor.py:1133 ms3.9%
Connection.waitpsycopg/connection.py:4953 ms3.9%
instrumented_test_renderdjango/test/utils.py:1123 ms3.9%
Signal.senddjango/dispatch/dispatcher.py:2493 ms3.9%
store_rendered_templatesdjango/test/client.py:2753 ms3.9%
indexaccounts/views.py:4128 ms11.8%
CountlessPaginator.get_pageaccounts/views.py:848 ms11.8%
CountlessPaginator.pageaccounts/views.py:908 ms11.8%
CountlessPage.__init__accounts/views.py:28 self.object_list = list(self.object_list)8 ms11.8%
QuerySet.__iter__django/db/models/query.py:4398 ms11.8%
QuerySet._fetch_alldjango/db/models/query.py:22628 ms11.8%
ModelIterable.__iter__django/db/models/query.py:1035 ms7.9%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16125 ms7.9%
SQLCompiler.as_sqldjango/db/models/sql/compiler.py:7683 ms3.9%
SQLCompiler.pre_sql_setupdjango/db/models/sql/compiler.py:913 ms3.9%
WhereNode.split_having_qualifydjango/db/models/sql/where.py:473 ms3.9%
cached_property.__get__django/utils/functional.py:473 ms3.9%
WhereNode.contains_aggregatedjango/db/models/sql/where.py:2543 ms3.9%
WhereNode._contains_aggregatedjango/db/models/sql/where.py:2493 ms3.9%
WhereNode._contains_aggregate.<locals>.<genexpr>django/db/models/sql/where.py:2493 ms3.9%
SQLCompiler.as_sqldjango/db/models/sql/compiler.py:7933 ms3.9%
SQLCompiler.get_from_clausedjango/db/models/sql/compiler.py:11603 ms3.9%
SQLCompiler.compiledjango/db/models/sql/compiler.py:5793 ms3.9%
Join.as_sqldjango/db/models/sql/datastructures.py:883 ms3.9%
DatabaseOperations.prepare_join_on_clausedjango/db/backends/postgresql/operations.py:4023 ms3.9%
ModelIterable.__iter__django/db/models/query.py:1463 ms3.9%
Model.from_dbdjango/db/models/base.py:6253 ms3.9%
Model.__init__django/db/models/base.py:5303 ms3.9%
indexaccounts/views.py:295 language_counts = Daily.objects.order_by("date").last()5 ms7.9%
QuerySet.lastdjango/db/models/query.py:12255 ms7.9%
QuerySet.__iter__django/db/models/query.py:4395 ms7.9%
QuerySet._fetch_alldjango/db/models/query.py:22625 ms7.9%
ModelIterable.__iter__django/db/models/query.py:1033 ms3.9%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16123 ms3.9%
SQLCompiler.as_sqldjango/db/models/sql/compiler.py:7683 ms3.9%
SQLCompiler.pre_sql_setupdjango/db/models/sql/compiler.py:903 ms3.9%
SQLCompiler.get_order_bydjango/db/models/sql/compiler.py:4913 ms3.9%
ModelIterable.__iter__django/db/models/query.py:1353 ms3.9%
TestSelectedInstance.test_no_selected_instanceaccounts/tests.py:160 self.assertIsNone(self.client.session.get("selected_instance"))5 ms7.9%
ClientMixin.sessiondjango/test/client.py:8143 ms3.9%
ClientMixin.sessiondjango/test/client.py:8153 ms3.9%
SessionStore.savedjango/contrib/sessions/backends/db.py:1213 ms3.9%
SessionStore.createdjango/contrib/sessions/backends/db.py:743 ms3.9%
SessionStore.savedjango/contrib/sessions/backends/db.py:1273 ms3.9%
Model.savedjango/db/models/base.py:9043 ms3.9%
Model.save_basedjango/db/models/base.py:9963 ms3.9%
TransactionTestCase._post_teardowndjango/test/testcases.py:1243 self._fixture_teardown()3 ms3.9%
TestCase._fixture_teardowndjango/test/testcases.py:14983 ms3.9%
DatabaseWrapper.check_constraintsdjango/db/backends/postgresql/base.py:4953 ms3.9%
CursorWrapper.executedjango/db/backends/utils.py:793 ms3.9%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:923 ms3.9%
CursorWrapper._executedjango/db/backends/utils.py:1033 ms3.9%
Cursor.executepsycopg/cursor.py:1133 ms3.9%
Connection.waitpsycopg/connection.py:4953 ms3.9%
Estimated from 25 samples; phase durations are exact. Frames from pytest and pluggy are hidden .

Hot lines in your code

accounts/tests.py:157
response = self.client.get("/?q=")
TestSelectedInstance.test_no_selected_instance · Libraries
30 ms
accounts/views.py:425
return render(
index · Templates
14 ms
accounts/views.py:28
self.object_list = list(self.object_list)
CountlessPage.__init__ · Database
8 ms
accounts/views.py:295
language_counts = Daily.objects.order_by("date").last()
index · Database
5 ms
accounts/tests.py:160
self.assertIsNone(self.client.session.get("selected_instance"))
TestSelectedInstance.test_no_selected_instance · Libraries
5 ms
accounts/templatetags/account_extras.py:36
for instance in instances:
instances_datalist · Database
3 ms

Fixtures

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

Database

12 queries · 5 ms
No repeated queries.

Biggest pieces of work

call test body
accounts/tests.py:157
65 ms
call _post_teardown
django/test/testcases.py:1243
3 ms

Reliability

5 results · 0 CI failures · 0 local failures

This test hasn't failed recently.

History

Latest 50 results, oldest first in the strip
When Environment Outcome Duration Commit
7 hours ago CI github-actions:test passed 69 ms d923a46 main Profile
7 hours ago CI github-actions:test passed 126 ms 82997f8 main Profile
7 hours ago CI github-actions:test passed 220 ms 623aa3e main Profile
12 hours ago CI github-actions:test passed 385 ms ab6465a main Profile
12 hours ago CI github-actions:test passed 117 ms 0c23747 main Run
3 months, 3 weeks ago CI github-actions passed 119 ms 69d78ea HEAD Run
3 months, 3 weeks ago CI github-actions passed 177 ms 8fac7b5 main Run
3 months, 3 weeks ago CI github-actions passed 175 ms 36b9579 main Run
3 months, 3 weeks ago CI github-actions passed 187 ms 553d048 main Run
3 months, 3 weeks ago CI github-actions passed 176 ms 8eb0f44 HEAD Run
3 months, 3 weeks ago CI github-actions passed 209 ms e0fb3ac HEAD Run
3 months, 3 weeks ago CI github-actions passed 174 ms a849b58 HEAD Run
3 months, 3 weeks ago CI github-actions passed 180 ms 6418e05 HEAD Run
3 months, 3 weeks ago CI github-actions passed 190 ms 5b9b309 main Run
3 months, 4 weeks ago CI github-actions passed 184 ms 1f2c5a6 main Run
3 months, 4 weeks ago CI github-actions passed 188 ms 5ec7fa8 main Run
3 months, 4 weeks ago CI github-actions passed 187 ms 1e42064 main Run
3 months, 4 weeks ago CI github-actions passed 176 ms fcb1b79 main Run
3 months, 4 weeks ago CI github-actions passed 188 ms 1460ac2 HEAD Run
3 months, 4 weeks ago CI github-actions passed 183 ms 8129f09 HEAD Run