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

TestSelectedInstance::test_selected_instance_http_truncate

First seen 2 years, 10 months ago in 1cd3a8d
CI github-actions:test 4 runs
Average
201 ms
median 216 ms
max 292 ms
Phases
Setup 3 ms Call 198 ms Teardown 0.35 ms
Categories
Database 19 ms App code 0.40 ms Other (Libraries, Templates, pytest, Unsampled) 181 ms

13 database queries per run

Needs 709 KB of memory (max 732 KB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, 7 hours ago · open run
Show pytest frames
setup0.94 ms1.1%
ABCMeta.__instancecheck__<frozen abc>:1190.94 ms1.1%
call81 ms98.3%
TestSelectedInstance.test_selected_instance_http_truncateaccounts/tests.py:217 response = self.client.get("/?selected_instance=https://mastodon.social")76 ms92.2%
Client.getdjango/test/client.py:113376 ms92.2%
RequestFactory.getdjango/test/client.py:47576 ms92.2%
RequestFactory.genericdjango/test/client.py:67176 ms92.2%
Client.requestdjango/test/client.py:109176 ms92.2%
ClientHandler.__call__django/test/client.py:17353 ms64.5%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6353 ms64.5%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10451 ms61.5%
WhiteNoise.add_fileswhitenoise/base.py:10851 ms61.5%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12033 ms40.0%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:13133 ms40.0%
WhiteNoise.get_static_filewhitenoise/base.py:21725 ms30.7%
StaticFile.__init__whitenoise/responders.py:7310 ms12.3%
StaticFile.get_headerswhitenoise/responders.py:1805 ms6.1%
StaticFile.get_headerswhitenoise/responders.py:1783 ms3.1%
parsedate<stdlib>/email/_parseaddr.py:1853 ms3.1%
parsedate_tz<stdlib>/email/_parseaddr.py:503 ms3.1%
StaticFile.get_headerswhitenoise/responders.py:1763 ms3.1%
StaticFile.__init__whitenoise/responders.py:778 ms9.2%
StaticFile.get_alternativeswhitenoise/responders.py:2013 ms3.1%
Headers.__setitem__<stdlib>/wsgiref/headers.py:623 ms3.1%
Headers.__delitem__<stdlib>/wsgiref/headers.py:723 ms3.1%
StaticFile.get_alternativeswhitenoise/responders.py:2003 ms3.1%
__init____init__:-13 ms3.1%
Headers.__init__<stdlib>/wsgiref/headers.py:443 ms3.1%
Headers._convert_string_type<stdlib>/wsgiref/headers.py:503 ms3.1%
StaticFile.get_alternativeswhitenoise/responders.py:1983 ms3.1%
StaticFile.get_alternatives.<locals>.<lambda>whitenoise/responders.py:1983 ms3.1%
<GC>~3 ms3.1%
StaticFile.__init__whitenoise/responders.py:743 ms3.1%
parsedate<stdlib>/email/_parseaddr.py:1853 ms3.1%
parsedate_tz<stdlib>/email/_parseaddr.py:503 ms3.1%
_parsedate_tz<stdlib>/email/_parseaddr.py:813 ms3.1%
StaticFile.__init__whitenoise/responders.py:763 ms3.1%
StaticFile.get_not_modified_responsewhitenoise/responders.py:1883 ms3.1%
StaticFile.__init__whitenoise/responders.py:723 ms3.1%
StaticFile.get_file_statswhitenoise/responders.py:1613 ms3.1%
__init____init__:-13 ms3.1%
FileEntry.__init__whitenoise/responders.py:2633 ms3.1%
FileEntry.stat_regular_filewhitenoise/responders.py:2743 ms3.1%
WhiteNoise.get_static_filewhitenoise/base.py:2128 ms9.2%
WhiteNoise.add_cache_headerswhitenoise/base.py:2343 ms3.1%
Headers.__setitem__<stdlib>/wsgiref/headers.py:623 ms3.1%
Headers.__delitem__<stdlib>/wsgiref/headers.py:723 ms3.1%
WhiteNoise.add_cache_headerswhitenoise/base.py:2333 ms3.1%
WhiteNoiseMiddleware.immutable_file_testwhitenoise/middleware.py:1763 ms3.1%
WhiteNoiseMiddleware.get_static_urlwhitenoise/middleware.py:1973 ms3.1%
WhiteNoise.update_files_dictionarywhitenoise/base.py:11515 ms18.4%
scantreewhitenoise/base.py:27113 ms15.4%
scantreewhitenoise/base.py:27113 ms15.4%
scantreewhitenoise/base.py:2738 ms9.2%
scantreewhitenoise/base.py:2715 ms6.1%
scantreewhitenoise/base.py:2715 ms6.1%
scantreewhitenoise/base.py:2715 ms6.1%
scantreewhitenoise/base.py:2735 ms6.1%
scantreewhitenoise/base.py:2733 ms3.1%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:953 ms3.1%
ClientHandler.__call__django/test/client.py:18623 ms27.7%
BaseHandler.get_responsedjango/core/handlers/base.py:14223 ms27.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5623 ms27.7%
MiddlewareMixin.__call__django/utils/deprecation.py:38023 ms27.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5623 ms27.7%
MiddlewareMixin.__call__django/utils/deprecation.py:38023 ms27.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5623 ms27.7%
MiddlewareMixin.__call__django/utils/deprecation.py:38023 ms27.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5623 ms27.7%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:12323 ms27.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5623 ms27.7%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:14523 ms27.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5623 ms27.7%
MiddlewareMixin.__call__django/utils/deprecation.py:38018 ms21.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5618 ms21.5%
MiddlewareMixin.__call__django/utils/deprecation.py:38018 ms21.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5618 ms21.5%
MiddlewareMixin.__call__django/utils/deprecation.py:38018 ms21.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5618 ms21.5%
MiddlewareMixin.__call__django/utils/deprecation.py:38018 ms21.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5618 ms21.5%
MiddlewareMixin.__call__django/utils/deprecation.py:38018 ms21.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5618 ms21.5%
MiddlewareMixin.__call__django/utils/deprecation.py:38018 ms21.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5618 ms21.5%
MiddlewareMixin.__call__django/utils/deprecation.py:38018 ms21.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5618 ms21.5%
BaseHandler._get_responsedjango/core/handlers/base.py:19918 ms21.5%
indexaccounts/views.py:425 return render(10 ms12.3%
renderdjango/shortcuts.py:2710 ms12.3%
render_to_stringdjango/template/loader.py:6210 ms12.3%
Template.renderdjango/template/backends/django.py:10710 ms12.3%
Template.renderdjango/template/base.py:17510 ms12.3%
instrumented_test_renderdjango/test/utils.py:11310 ms12.3%
NodeList.renderdjango/template/base.py:110810 ms12.3%
Node.render_annotateddjango/template/base.py:106910 ms12.3%
ExtendsNode.renderdjango/template/loader_tags.py:1608 ms9.2%
instrumented_test_renderdjango/test/utils.py:1138 ms9.2%
NodeList.renderdjango/template/base.py:11088 ms9.2%
Node.render_annotateddjango/template/base.py:10698 ms9.2%
BlockNode.renderdjango/template/loader_tags.py:668 ms9.2%
NodeList.renderdjango/template/base.py:11088 ms9.2%
Node.render_annotateddjango/template/base.py:10698 ms9.2%
IncludeNode.renderdjango/template/loader_tags.py:2115 ms6.1%
Template.renderdjango/template/base.py:1775 ms6.1%
instrumented_test_renderdjango/test/utils.py:1135 ms6.1%
NodeList.renderdjango/template/base.py:11085 ms6.1%
Node.render_annotateddjango/template/base.py:10695 ms6.1%
ForNode.renderdjango/template/defaulttags.py:2495 ms6.1%
Node.render_annotateddjango/template/base.py:10695 ms6.1%
ForNode.renderdjango/template/defaulttags.py:2493 ms3.1%
Node.render_annotateddjango/template/base.py:10693 ms3.1%
StaticNode.renderdjango/templatetags/static.py:1163 ms3.1%
StaticNode.urldjango/templatetags/static.py:1133 ms3.1%
StaticNode.handle_simpledjango/templatetags/static.py:1293 ms3.1%
URLMixin.urldebug_toolbar/panels/staticfiles.py:203 ms3.1%
IfNode.renderdjango/template/defaulttags.py:3263 ms3.1%
ExtendsNode.renderdjango/template/loader_tags.py:1523 ms3.1%
NodeList.get_nodes_by_typedjango/template/base.py:11143 ms3.1%
Node.get_nodes_by_typedjango/template/base.py:10963 ms3.1%
indexaccounts/views.py:4125 ms6.1%
CountlessPaginator.get_pageaccounts/views.py:845 ms6.1%
CountlessPaginator.pageaccounts/views.py:905 ms6.1%
CountlessPage.__init__accounts/views.py:28 self.object_list = list(self.object_list)5 ms6.1%
QuerySet.__iter__django/db/models/query.py:4395 ms6.1%
QuerySet._fetch_alldjango/db/models/query.py:22625 ms6.1%
ModelIterable.__iter__django/db/models/query.py:1035 ms6.1%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16255 ms6.1%
CursorWrapper.executedjango/db/backends/utils.py:795 ms6.1%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:925 ms6.1%
CursorWrapper._executedjango/db/backends/utils.py:1055 ms6.1%
Cursor.executepsycopg/cursor.py:1135 ms6.1%
Connection.waitpsycopg/connection.py:4955 ms6.1%
BaseCursor._execute_genpsycopg/_cursor_base.py:2065 ms6.1%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2865 ms6.1%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:785 ms6.1%
indexaccounts/views.py:375 .filter(search_query)3 ms3.1%
QuerySet.filterdjango/db/models/query.py:16763 ms3.1%
QuerySet._filter_or_excludedjango/db/models/query.py:16893 ms3.1%
QuerySet._chaindjango/db/models/query.py:22343 ms3.1%
QuerySet._clonedjango/db/models/query.py:22473 ms3.1%
Query.chaindjango/db/models/sql/query.py:4383 ms3.1%
Query.clonedjango/db/models/sql/query.py:4243 ms3.1%
deepcopy<stdlib>/copy.py:1313 ms3.1%
MiddlewareMixin.__call__django/utils/deprecation.py:3825 ms6.1%
SessionMiddleware.process_responsedjango/contrib/sessions/middleware.py:605 ms6.1%
SessionStore.savedjango/contrib/sessions/backends/db.py:1215 ms6.1%
SessionStore.createdjango/contrib/sessions/backends/db.py:703 ms3.1%
SessionBase._get_new_session_keydjango/contrib/sessions/backends/base.py:2013 ms3.1%
SessionStore.existsdjango/contrib/sessions/backends/db.py:633 ms3.1%
QuerySet.existsdjango/db/models/query.py:14583 ms3.1%
Query.has_resultsdjango/db/models/sql/query.py:6873 ms3.1%
SQLCompiler.has_resultsdjango/db/models/sql/compiler.py:15933 ms3.1%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16123 ms3.1%
SQLCompiler.as_sqldjango/db/models/sql/compiler.py:7683 ms3.1%
SQLCompiler.pre_sql_setupdjango/db/models/sql/compiler.py:893 ms3.1%
SQLCompiler.setup_querydjango/db/models/sql/compiler.py:783 ms3.1%
SQLCompiler.get_selectdjango/db/models/sql/compiler.py:3193 ms3.1%
SQLCompiler.compiledjango/db/models/sql/compiler.py:5793 ms3.1%
SessionStore.createdjango/contrib/sessions/backends/db.py:743 ms3.1%
SessionStore.savedjango/contrib/sessions/backends/db.py:1263 ms3.1%
Atomic.__enter__django/db/transaction.py:2233 ms3.1%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:263 ms3.1%
BaseDatabaseWrapper.savepointdjango/db/backends/base/base.py:4003 ms3.1%
BaseDatabaseWrapper._savepointdjango/db/backends/base/base.py:3673 ms3.1%
CursorWrapper.executedjango/db/backends/utils.py:793 ms3.1%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:923 ms3.1%
CursorWrapper._executedjango/db/backends/utils.py:1033 ms3.1%
Cursor.executepsycopg/cursor.py:1133 ms3.1%
Connection.waitpsycopg/connection.py:4953 ms3.1%
TestSelectedInstance.test_selected_instance_http_truncateaccounts/tests.py:220 self.assertEqual(self.client.session["selected_instance"], "mastodon.social")3 ms3.1%
SessionBase.__getitem__django/contrib/sessions/backends/base.py:553 ms3.1%
SessionBase._get_sessiondjango/contrib/sessions/backends/base.py:2543 ms3.1%
SessionStore.loaddjango/contrib/sessions/backends/db.py:553 ms3.1%
SessionStore._get_session_from_dbdjango/contrib/sessions/backends/db.py:343 ms3.1%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:873 ms3.1%
QuerySet.getdjango/db/models/query.py:7023 ms3.1%
QuerySet.__len__django/db/models/query.py:4213 ms3.1%
QuerySet._fetch_alldjango/db/models/query.py:22623 ms3.1%
ModelIterable.__iter__django/db/models/query.py:1033 ms3.1%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16253 ms3.1%
CursorWrapper.executedjango/db/backends/utils.py:793 ms3.1%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:923 ms3.1%
CursorWrapper._executedjango/db/backends/utils.py:1053 ms3.1%
Cursor.executepsycopg/cursor.py:1133 ms3.1%
Connection.waitpsycopg/connection.py:4953 ms3.1%
BaseCursor._execute_genpsycopg/_cursor_base.py:2063 ms3.1%
TransactionTestCase._post_teardowndjango/test/testcases.py:1243 self._fixture_teardown()3 ms3.1%
TestCase._fixture_teardowndjango/test/testcases.py:14983 ms3.1%
DatabaseWrapper.check_constraintsdjango/db/backends/postgresql/base.py:4953 ms3.1%
CursorWrapper.executedjango/db/backends/utils.py:793 ms3.1%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:923 ms3.1%
CursorWrapper._executedjango/db/backends/utils.py:1033 ms3.1%
Cursor.executepsycopg/cursor.py:1133 ms3.1%
Connection.waitpsycopg/connection.py:4953 ms3.1%
teardown0.42 ms0.5%
Estimated from 34 samples; phase durations are exact. Frames from pytest and pluggy are hidden .

Hot lines in your code

accounts/tests.py:217
response = self.client.get("/?selected_instance=https://mastodon.social")
TestSelectedInstance.test_selected_instance_http_truncate · Libraries
58 ms
accounts/views.py:425
return render(
index · Templates
10 ms
accounts/views.py:28
self.object_list = list(self.object_list)
CountlessPage.__init__ · Database
5 ms
accounts/views.py:375
.filter(search_query)
index · Database
3 ms
accounts/tests.py:220
self.assertEqual(self.client.session["selected_instance"], "mastodon.social")
TestSelectedInstance.test_selected_instance_http_truncate · Database
3 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.04 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.03 ms
monkeypatch function 0.02 ms

Database

13 queries · 6 ms
No repeated queries.

Biggest pieces of work

call test body
accounts/tests.py:217
79 ms
call _post_teardown
django/test/testcases.py:1243
3 ms
setup __instancecheck__
<frozen abc>:119
0.94 ms
teardown pytest internals 0.42 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 82 ms d923a46 main Profile
7 hours ago CI github-actions:test passed 163 ms 82997f8 main Profile
7 hours ago CI github-actions:test passed 292 ms 623aa3e main Profile
12 hours ago CI github-actions:test passed 268 ms ab6465a main Profile
12 hours ago CI github-actions:test passed 113 ms 0c23747 main Run
3 months, 3 weeks ago CI github-actions passed 116 ms 69d78ea HEAD Run
3 months, 3 weeks ago CI github-actions passed 175 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 183 ms 553d048 main Run
3 months, 3 weeks ago CI github-actions passed 173 ms 8eb0f44 HEAD Run
3 months, 3 weeks ago CI github-actions passed 185 ms e0fb3ac HEAD Run
3 months, 3 weeks ago CI github-actions passed 200 ms a849b58 HEAD Run
3 months, 3 weeks ago CI github-actions passed 177 ms 6418e05 HEAD Run
3 months, 3 weeks ago CI github-actions passed 205 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 182 ms 5ec7fa8 main Run
3 months, 4 weeks ago CI github-actions passed 193 ms 1e42064 main Run
3 months, 4 weeks ago CI github-actions passed 180 ms fcb1b79 main Run
3 months, 4 weeks ago CI github-actions passed 190 ms 1460ac2 HEAD Run
3 months, 4 weeks ago CI github-actions passed 192 ms 8129f09 HEAD Run