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

TestSelectedInstance::test_no_selected_instance

First seen 2 years, 11 months ago in 1cd3a8d
CI github-actions:test 11 runs
Average
156 ms
median 147 ms
max 385 ms
Phases
Setup 2 ms Call 154 ms Teardown 0.46 ms
Categories
Database 32 ms App code 0.11 ms Other (Libraries, Templates, pytest, Unsampled) 124 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
setup1 ms0.9%
call150 ms98.8%
TestSelectedInstance.test_no_selected_instanceaccounts/tests.py:157 response = self.client.get("/?q=")142 ms93.2%
Client.getdjango/test/client.py:1133142 ms93.2%
RequestFactory.getdjango/test/client.py:475142 ms93.2%
RequestFactory.genericdjango/test/client.py:671142 ms93.2%
Client.requestdjango/test/client.py:1091142 ms93.2%
ClientHandler.__call__django/test/client.py:18678 ms51.0%
BaseHandler.get_responsedjango/core/handlers/base.py:14278 ms51.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5678 ms51.0%
MiddlewareMixin.__call__django/utils/deprecation.py:38078 ms51.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5678 ms51.0%
MiddlewareMixin.__call__django/utils/deprecation.py:38078 ms51.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5678 ms51.0%
MiddlewareMixin.__call__django/utils/deprecation.py:38078 ms51.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5678 ms51.0%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:12378 ms51.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5678 ms51.0%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:14578 ms51.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5678 ms51.0%
MiddlewareMixin.__call__django/utils/deprecation.py:38078 ms51.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5678 ms51.0%
MiddlewareMixin.__call__django/utils/deprecation.py:38078 ms51.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5678 ms51.0%
MiddlewareMixin.__call__django/utils/deprecation.py:38078 ms51.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5678 ms51.0%
MiddlewareMixin.__call__django/utils/deprecation.py:38078 ms51.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5678 ms51.0%
MiddlewareMixin.__call__django/utils/deprecation.py:38078 ms51.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5678 ms51.0%
MiddlewareMixin.__call__django/utils/deprecation.py:38078 ms51.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5678 ms51.0%
MiddlewareMixin.__call__django/utils/deprecation.py:38078 ms51.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5678 ms51.0%
BaseHandler._get_responsedjango/core/handlers/base.py:19978 ms51.0%
indexaccounts/views.py:295 language_counts = Daily.objects.order_by("date").last()50 ms32.7%
QuerySet.lastdjango/db/models/query.py:122550 ms32.7%
QuerySet.__iter__django/db/models/query.py:43950 ms32.7%
QuerySet._fetch_alldjango/db/models/query.py:226250 ms32.7%
ModelIterable.__iter__django/db/models/query.py:10350 ms32.7%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:162550 ms32.7%
CursorWrapper.executedjango/db/backends/utils.py:7950 ms32.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:9250 ms32.7%
CursorWrapper._executedjango/db/backends/utils.py:10550 ms32.7%
Cursor.executepsycopg/cursor.py:11350 ms32.7%
Connection.waitpsycopg/connection.py:49550 ms32.7%
indexaccounts/views.py:425 return render(17 ms11.2%
renderdjango/shortcuts.py:2717 ms11.2%
render_to_stringdjango/template/loader.py:6217 ms11.2%
Template.renderdjango/template/backends/django.py:10717 ms11.2%
Template.renderdjango/template/base.py:17517 ms11.2%
instrumented_test_renderdjango/test/utils.py:11317 ms11.2%
NodeList.renderdjango/template/base.py:110817 ms11.2%
Node.render_annotateddjango/template/base.py:106917 ms11.2%
ExtendsNode.renderdjango/template/loader_tags.py:16017 ms11.2%
instrumented_test_renderdjango/test/utils.py:11317 ms11.2%
NodeList.renderdjango/template/base.py:110817 ms11.2%
Node.render_annotateddjango/template/base.py:106916 ms10.4%
BlockNode.renderdjango/template/loader_tags.py:6612 ms8.0%
NodeList.renderdjango/template/base.py:110812 ms8.0%
Node.render_annotateddjango/template/base.py:106912 ms8.0%
ForNode.renderdjango/template/defaulttags.py:24912 ms8.0%
Node.render_annotateddjango/template/base.py:106911 ms7.2%
StaticNode.renderdjango/templatetags/static.py:1166 ms4.0%
StaticNode.urldjango/templatetags/static.py:1136 ms4.0%
StaticNode.handle_simpledjango/templatetags/static.py:1296 ms4.0%
URLMixin.urldebug_toolbar/panels/staticfiles.py:206 ms4.0%
HashedFilesMixin.urldjango/contrib/staticfiles/storage.py:2356 ms4.0%
HashedFilesMixin._urldjango/contrib/staticfiles/storage.py:2164 ms2.4%
FileSystemStorage.urldjango/core/files/storage/filesystem.py:2041 ms0.8%
filepath_to_uridjango/utils/encoding.py:2451 ms0.8%
FileSystemStorage.urldjango/core/files/storage/filesystem.py:2071 ms0.8%
urljoin<stdlib>/urllib/parse.py:7091 ms0.8%
_urlsplit<stdlib>/urllib/parse.py:5981 ms0.8%
HashedFilesMixin._urldjango/contrib/staticfiles/storage.py:2141 ms0.8%
ManifestFilesMixin.stored_namedjango/contrib/staticfiles/storage.py:6111 ms0.8%
urlunsplit<stdlib>/urllib/parse.py:6651 ms0.8%
HashedFilesMixin._urldjango/contrib/staticfiles/storage.py:2081 ms0.8%
SimpleNode.renderdjango/template/library.py:3432 ms1.6%
querystringdjango/template/defaulttags.py:13271 ms0.8%
QueryDict.__init__django/http/request.py:6031 ms0.8%
querystringdjango/template/defaulttags.py:13431 ms0.8%
IfNode.renderdjango/template/defaulttags.py:3261 ms0.8%
infix.<locals>.Operator.evaldjango/template/smartif.py:611 ms0.8%
<lambda>django/template/smartif.py:1061 ms0.8%
TemplateLiteral.evaldjango/template/defaulttags.py:9181 ms0.8%
FilterExpression.resolvedjango/template/base.py:8061 ms0.8%
Variable.resolvedjango/template/base.py:9451 ms0.8%
Variable._resolve_lookupdjango/template/base.py:9931 ms0.8%
VariableNode.renderdjango/template/base.py:11731 ms0.8%
InclusionNode.renderdjango/template/library.py:3811 ms0.8%
tailwind_csstailwind/templatetags/tailwind_tags.py:231 ms0.8%
get_configtailwind/__init__.py:211 ms0.8%
Mapping.get<frozen _collections_abc>:7951 ms0.8%
_Environ.__getitem__<frozen os>:-11 ms0.8%
URLNode.renderdjango/template/defaulttags.py:5111 ms0.8%
reversedjango/urls/base.py:441 ms0.8%
get_script_prefixdjango/urls/base.py:1351 ms0.8%
Local.__getattr__asgiref/local.py:1571 ms0.8%
Local._lock_storageasgiref/local.py:1531 ms0.8%
IfNode.renderdjango/template/defaulttags.py:3331 ms0.8%
NodeList.renderdjango/template/base.py:11081 ms0.8%
Node.render_annotateddjango/template/base.py:10691 ms0.8%
TranslateNode.renderdjango/templatetags/i18n.py:911 ms0.8%
render_value_in_contextdjango/template/base.py:11501 ms0.8%
lazy.<locals>.__proxy__.__str__django/utils/functional.py:1191 ms0.8%
lazy.<locals>.__proxy__.__castdjango/utils/functional.py:1101 ms0.8%
gettextdjango/utils/translation/__init__.py:961 ms0.8%
gettextdjango/utils/translation/trans_real.py:3791 ms0.8%
indexaccounts/views.py:412 page_obj = paginator.get_page(page_number)10 ms6.4%
CountlessPaginator.get_pageaccounts/views.py:8410 ms6.4%
CountlessPaginator.pageaccounts/views.py:9010 ms6.4%
CountlessPage.__init__accounts/views.py:28 self.object_list = list(self.object_list)10 ms6.4%
QuerySet.__iter__django/db/models/query.py:43910 ms6.4%
QuerySet._fetch_alldjango/db/models/query.py:226210 ms6.4%
ModelIterable.__iter__django/db/models/query.py:10310 ms6.4%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:162510 ms6.4%
CursorWrapper.executedjango/db/backends/utils.py:7910 ms6.4%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:9210 ms6.4%
CursorWrapper._executedjango/db/backends/utils.py:1056 ms4.0%
Cursor.executepsycopg/cursor.py:1136 ms4.0%
Connection.waitpsycopg/connection.py:4956 ms4.0%
BaseCursor._execute_genpsycopg/_cursor_base.py:2066 ms4.0%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2866 ms4.0%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:786 ms4.0%
indexaccounts/views.py:421 instances = Instance.objects.filter(deleted_at__isnull=True).values_list("instance", flat=True)1 ms0.8%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:871 ms0.8%
QuerySet.filterdjango/db/models/query.py:16761 ms0.8%
QuerySet._filter_or_excludedjango/db/models/query.py:16941 ms0.8%
QuerySet._filter_or_exclude_inplacedjango/db/models/query.py:17041 ms0.8%
Query.add_qdjango/db/models/sql/query.py:16811 ms0.8%
Query._add_qdjango/db/models/sql/query.py:17131 ms0.8%
Query.build_filterdjango/db/models/sql/query.py:16131 ms0.8%
Query.build_lookupdjango/db/models/sql/query.py:14401 ms0.8%
deconstructible.<locals>.decorator.<locals>.__new__django/utils/deconstruct.py:171 ms0.8%
ClientHandler.__call__django/test/client.py:17364 ms42.2%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6364 ms42.2%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10464 ms42.2%
WhiteNoise.add_fileswhitenoise/base.py:10864 ms42.2%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12057 ms37.4%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:13157 ms37.4%
WhiteNoise.get_static_filewhitenoise/base.py:21757 ms37.4%
StaticFile.__init__whitenoise/responders.py:7452 ms34.2%
Headers.__getitem__<stdlib>/wsgiref/headers.py:8351 ms33.5%
Headers.get<stdlib>/wsgiref/headers.py:10451 ms33.5%
parsedate<stdlib>/email/_parseaddr.py:1851 ms0.8%
StaticFile.__init__whitenoise/responders.py:734 ms2.4%
StaticFile.get_headerswhitenoise/responders.py:1781 ms0.8%
parsedate<stdlib>/email/_parseaddr.py:1851 ms0.8%
StaticFile.get_headerswhitenoise/responders.py:1761 ms0.8%
formatdate<stdlib>/email/utils.py:2661 ms0.8%
StaticFile.get_headerswhitenoise/responders.py:1671 ms0.8%
StaticFile.__init__whitenoise/responders.py:771 ms0.8%
StaticFile.get_alternativeswhitenoise/responders.py:2001 ms0.8%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1157 ms4.8%
scantreewhitenoise/base.py:2717 ms4.8%
scantreewhitenoise/base.py:2715 ms3.2%
scantreewhitenoise/base.py:2732 ms1.6%
scantreewhitenoise/base.py:2711 ms0.8%
scantreewhitenoise/base.py:2711 ms0.8%
scantreewhitenoise/base.py:2711 ms0.8%
scantreewhitenoise/base.py:2691 ms0.8%
scantreewhitenoise/base.py:2691 ms0.8%
scantreewhitenoise/base.py:2731 ms0.8%
TestSelectedInstance.test_no_selected_instanceaccounts/tests.py:160 self.assertIsNone(self.client.session.get("selected_instance"))6 ms4.0%
ClientMixin.sessiondjango/test/client.py:8156 ms4.0%
SessionStore.savedjango/contrib/sessions/backends/db.py:1216 ms4.0%
SessionStore.createdjango/contrib/sessions/backends/db.py:744 ms2.4%
SessionStore.savedjango/contrib/sessions/backends/db.py:1262 ms1.6%
Atomic.__enter__django/db/transaction.py:2231 ms0.8%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:261 ms0.8%
BaseDatabaseWrapper.savepointdjango/db/backends/base/base.py:4001 ms0.8%
BaseDatabaseWrapper._savepointdjango/db/backends/base/base.py:3671 ms0.8%
CursorWrapper.executedjango/db/backends/utils.py:791 ms0.8%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms0.8%
CursorWrapper._executedjango/db/backends/utils.py:1031 ms0.8%
Cursor.executepsycopg/cursor.py:1131 ms0.8%
Connection.waitpsycopg/connection.py:4951 ms0.8%
Atomic.__exit__django/db/transaction.py:2591 ms0.8%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:261 ms0.8%
BaseDatabaseWrapper.savepoint_commitdjango/db/backends/base/base.py:4311 ms0.8%
BaseDatabaseWrapper._savepoint_commitdjango/db/backends/base/base.py:3751 ms0.8%
CursorWrapper.executedjango/db/backends/utils.py:791 ms0.8%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms0.8%
CursorWrapper._executedjango/db/backends/utils.py:1031 ms0.8%
Cursor.executepsycopg/cursor.py:1131 ms0.8%
Connection.waitpsycopg/connection.py:4951 ms0.8%
BaseCursor._execute_genpsycopg/_cursor_base.py:2051 ms0.8%
BaseCursor._convert_querypsycopg/_cursor_base.py:4651 ms0.8%
PostgresClientQuery.convertpsycopg/_queries.py:2731 ms0.8%
PostgresQuery._ensure_bytespsycopg/_queries.py:1671 ms0.8%
conn_encodingpsycopg/_encodings.py:871 ms0.8%
SessionStore.savedjango/contrib/sessions/backends/db.py:1231 ms0.8%
SessionStore.create_model_instancedjango/contrib/sessions/backends/db.py:1021 ms0.8%
SessionStore.createdjango/contrib/sessions/backends/db.py:702 ms1.6%
SessionBase._get_new_session_keydjango/contrib/sessions/backends/base.py:2001 ms0.8%
get_random_stringdjango/utils/crypto.py:781 ms0.8%
get_random_string.<locals>.<genexpr>django/utils/crypto.py:781 ms0.8%
Random.choice<stdlib>/random.py:3541 ms0.8%
Random._randbelow_with_getrandbits<stdlib>/random.py:2511 ms0.8%
SystemRandom.getrandbits<stdlib>/random.py:9151 ms0.8%
SessionBase._get_new_session_keydjango/contrib/sessions/backends/base.py:2011 ms0.8%
SessionStore.existsdjango/contrib/sessions/backends/db.py:631 ms0.8%
QuerySet.existsdjango/db/models/query.py:14581 ms0.8%
Query.has_resultsdjango/db/models/sql/query.py:6871 ms0.8%
SQLCompiler.has_resultsdjango/db/models/sql/compiler.py:15931 ms0.8%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16121 ms0.8%
SQLCompiler.as_sqldjango/db/models/sql/compiler.py:7681 ms0.8%
SQLCompiler.pre_sql_setupdjango/db/models/sql/compiler.py:891 ms0.8%
SQLCompiler.setup_querydjango/db/models/sql/compiler.py:781 ms0.8%
SQLCompiler.get_selectdjango/db/models/sql/compiler.py:3191 ms0.8%
SQLCompiler.compiledjango/db/models/sql/compiler.py:5791 ms0.8%
Value.as_sqldjango/db/models/expressions.py:11791 ms0.8%
IntegerField.get_db_prep_valuedjango/db/models/fields/__init__.py:22161 ms0.8%
DatabaseOperations.adapt_integerfield_valuedjango/db/backends/postgresql/operations.py:3251 ms0.8%
TestSelectedInstance.test_no_selected_instanceaccounts/tests.py:161 self.assertContains(1 ms0.8%
SimpleTestCase.assertContainsdjango/test/testcases.py:6061 ms0.8%
SimpleTestCase._assert_containsdjango/test/testcases.py:5931 ms0.8%
TransactionTestCase._post_teardowndjango/test/testcases.py:1243 self._fixture_teardown()1 ms0.8%
TestCase._fixture_teardowndjango/test/testcases.py:14981 ms0.8%
DatabaseWrapper.check_constraintsdjango/db/backends/postgresql/base.py:4961 ms0.8%
CursorWrapper.executedjango/db/backends/utils.py:791 ms0.8%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms0.8%
CursorWrapper._executedjango/db/backends/utils.py:1031 ms0.8%
Cursor.executepsycopg/cursor.py:1131 ms0.8%
Connection.waitpsycopg/connection.py:4951 ms0.8%
BaseCursor._execute_genpsycopg/_cursor_base.py:2061 ms0.8%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2861 ms0.8%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:781 ms0.8%
Estimated from 125 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
64 ms
accounts/views.py:295
language_counts = Daily.objects.order_by("date").last()
index · Database
50 ms
accounts/views.py:425
return render(
index · Templates
17 ms
accounts/views.py:28
self.object_list = list(self.object_list)
CountlessPage.__init__ · Database
10 ms
accounts/tests.py:160
self.assertIsNone(self.client.session.get("selected_instance"))
TestSelectedInstance.test_no_selected_instance · Database
6 ms
accounts/views.py:421
instances = Instance.objects.filter(deleted_at__isnull=True).values_list("instance", flat=True)
index · Database
1 ms
accounts/tests.py:161
self.assertContains(
TestSelectedInstance.test_no_selected_instance · Libraries
1 ms

Fixtures

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

Database

12 queries · 11 ms
No repeated queries.

Biggest pieces of work

call test body
accounts/tests.py:157
149 ms
setup pytest internals 1 ms
call _post_teardown
django/test/testcases.py:1243
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 152 ms c28a326 main Profile
16 hours ago CI github-actions:test passed 55 ms 9b8826a main Profile
22 hours ago CI github-actions:test passed 178 ms 4f01055 main Profile
1 week, 5 days ago CI github-actions:test passed 147 ms 8ab642e main Profile
2 weeks, 2 days ago CI github-actions:test passed 86 ms 9b75244 main Profile
2 weeks, 2 days ago CI github-actions:test passed 129 ms 9603516 main Profile
2 weeks, 4 days ago CI github-actions:test passed 170 ms 615a272 main Profile
3 weeks ago CI github-actions:test passed 69 ms d923a46 main Profile
3 weeks ago CI github-actions:test passed 126 ms 82997f8 main Profile
3 weeks ago CI github-actions:test passed 220 ms 623aa3e main Profile
3 weeks ago CI github-actions:test passed 385 ms ab6465a main Profile
3 weeks ago CI github-actions:test passed 117 ms 0c23747 main Run