flakytest.dev anze3db flakytest
Tests / apps/mcp/tests.py

McpTest::test_unknown_environment_is_a_tool_error

First seen 8 hours ago in 78a4357
CI github-actions:test 5 runs
Average
36 ms
median 40 ms
max 44 ms
Phases
Setup 0.72 ms Call 35 ms Teardown 0.87 ms
Categories
Database 9 ms Other (Libraries, Unsampled, pytest) 28 ms

9 database queries per run

Needs 0 KB of memory (max 0 KB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, an hour ago · open run
Show pytest frames
call38 ms94.6%
McpTest.test_unknown_environment_is_a_tool_errorapps/mcp/tests.py:199 body = self.rpc("tools/call", {"name": "get_overview", "arguments": {"environment": "ci:nope"}})32 ms78.8%
McpTest.rpcapps/mcp/tests.py:7432 ms78.8%
McpTest.postapps/mcp/tests.py:66 return self.client.post(32 ms78.8%
Client.postdjango/test/client.py:115332 ms78.8%
RequestFactory.postdjango/test/client.py:49932 ms78.8%
RequestFactory.genericdjango/test/client.py:67132 ms78.8%
Client.requestdjango/test/client.py:108232 ms78.8%
ClientHandler.__call__django/test/client.py:17328 ms68.3%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6228 ms68.3%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10428 ms68.3%
WhiteNoise.add_fileswhitenoise/base.py:10828 ms68.3%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12019 ms47.3%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:13119 ms47.3%
WhiteNoise.get_static_filewhitenoise/base.py:20311 ms26.3%
WhiteNoise.add_cache_headerswhitenoise/base.py:2249 ms21.0%
WhiteNoiseMiddleware.immutable_file_testwhitenoise/middleware.py:1769 ms21.0%
WhiteNoiseMiddleware.get_static_urlwhitenoise/middleware.py:1979 ms21.0%
URLMixin.urldebug_toolbar/panels/staticfiles.py:209 ms21.0%
HashedFilesMixin.urldjango/contrib/staticfiles/storage.py:2056 ms15.8%
HashedFilesMixin._urldjango/contrib/staticfiles/storage.py:1844 ms10.5%
HashedFilesMixin._urldjango/contrib/staticfiles/storage.py:1862 ms5.3%
FileSystemStorage.urldjango/core/files/storage/filesystem.py:2122 ms5.3%
WhiteNoise.get_static_filewhitenoise/base.py:2089 ms21.0%
StaticFile.__init__whitenoise/responders.py:724 ms10.5%
StaticFile.get_file_statswhitenoise/responders.py:1612 ms5.3%
StaticFile.get_file_statswhitenoise/responders.py:1632 ms5.3%
StaticFile.__init__whitenoise/responders.py:742 ms5.3%
parsedate<stdlib>/email/_parseaddr.py:1852 ms5.3%
StaticFile.__init__whitenoise/responders.py:762 ms5.3%
StaticFile.get_not_modified_responsewhitenoise/responders.py:1882 ms5.3%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1156 ms15.8%
scantreewhitenoise/base.py:2626 ms15.8%
scantreewhitenoise/base.py:2626 ms15.8%
scantreewhitenoise/base.py:2644 ms10.5%
scantreewhitenoise/base.py:2622 ms5.3%
scantreewhitenoise/base.py:2622 ms5.3%
scantreewhitenoise/base.py:2622 ms5.3%
scantreewhitenoise/base.py:2642 ms5.3%
ClientHandler.__call__django/test/client.py:1864 ms10.5%
BaseHandler.get_responsedjango/core/handlers/base.py:1414 ms10.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms10.5%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:1304 ms10.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms10.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms10.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms10.5%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:1234 ms10.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms10.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms10.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms10.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms10.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms10.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms10.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms10.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms10.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms10.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms10.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms10.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms10.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms10.5%
AccountMiddleware.<locals>.middlewareallauth/account/middleware.py:344 ms10.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms10.5%
BaseHandler._get_responsedjango/core/handlers/base.py:1984 ms10.5%
csrf_exempt.<locals>._view_wrapperdjango/views/decorators/csrf.py:654 ms10.5%
mcpapps/mcp/urls.py:1252 ms5.3%
authenticateapps/mcp/urls.py:55 project = Project.objects.filter(secrettokens__token=token).first()2 ms5.3%
QuerySet.firstdjango/db/models/query.py:11452 ms5.3%
QuerySet.__iter__django/db/models/query.py:3902 ms5.3%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms5.3%
ModelIterable.__iter__django/db/models/query.py:952 ms5.3%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms5.3%
CursorWrapper.executedjango/db/backends/utils.py:792 ms5.3%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms5.3%
mcpapps/mcp/urls.py:1472 ms5.3%
handleapps/mcp/urls.py:1152 ms5.3%
call_toolapps/mcp/urls.py:752 ms5.3%
Tools.callapps/mcp/tools.py:1812 ms5.3%
Tools.get_overviewapps/mcp/tools.py:2042 ms5.3%
Tools.scopeapps/mcp/tools.py:175 names = list(Environment.objects.filter(project=self.project).values_list("name", flat=True))2 ms5.3%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms5.3%
QuerySet.filterdjango/db/models/query.py:15422 ms5.3%
QuerySet._filter_or_excludedjango/db/models/query.py:15602 ms5.3%
QuerySet._filter_or_exclude_inplacedjango/db/models/query.py:15702 ms5.3%
Query.add_qdjango/db/models/sql/query.py:16712 ms5.3%
Query._add_qdjango/db/models/sql/query.py:17032 ms5.3%
Query.build_filterdjango/db/models/sql/query.py:16132 ms5.3%
Query.build_lookupdjango/db/models/sql/query.py:14402 ms5.3%
Lookup.__init__django/db/models/lookups.py:352 ms5.3%
TransactionTestCase._post_teardowndjango/test/testcases.py:1240 self._fixture_teardown()4 ms10.5%
TestCase._fixture_teardowndjango/test/testcases.py:14942 ms5.3%
TestCase._should_check_constraintsdjango/test/testcases.py:15032 ms5.3%
DatabaseWrapper.is_usabledjango/db/backends/postgresql/base.py:4922 ms5.3%
Cursor.executepsycopg/cursor.py:1132 ms5.3%
Connection.waitpsycopg/connection.py:4952 ms5.3%
BaseCursor._execute_genpsycopg/_cursor_base.py:2062 ms5.3%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2862 ms5.3%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:782 ms5.3%
TestCase._fixture_teardowndjango/test/testcases.py:14952 ms5.3%
DatabaseWrapper.check_constraintsdjango/db/backends/postgresql/base.py:4832 ms5.3%
CursorWrapper.executedjango/db/backends/utils.py:792 ms5.3%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms5.3%
CursorWrapper._executedjango/db/backends/utils.py:1032 ms5.3%
Cursor.executepsycopg/cursor.py:1132 ms5.3%
Connection.waitpsycopg/connection.py:4952 ms5.3%
TransactionTestCase._pre_setupdjango/test/testcases.py:1164 cls._fixture_setup()2 ms5.3%
TestCase._fixture_setupdjango/test/testcases.py:14782 ms5.3%
TestCase._enter_atomicsdjango/test/testcases.py:13962 ms5.3%
Atomic.__enter__django/db/transaction.py:2112 ms5.3%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:262 ms5.3%
BaseDatabaseWrapper.savepointdjango/db/backends/base/base.py:4002 ms5.3%
BaseDatabaseWrapper._savepointdjango/db/backends/base/base.py:3672 ms5.3%
CursorWrapper.executedjango/db/backends/utils.py:792 ms5.3%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms5.3%
CursorWrapper._executedjango/db/backends/utils.py:1032 ms5.3%
Cursor.executepsycopg/cursor.py:1132 ms5.3%
Connection.waitpsycopg/connection.py:4952 ms5.3%
teardown1 ms3.5%
Estimated from 19 samples; phase durations are exact. Frames from pytest and pluggy are hidden .

Hot lines in your code

apps/mcp/tests.py:66
return self.client.post(
McpTest.post · Libraries
28 ms
apps/mcp/urls.py:55
project = Project.objects.filter(secrettokens__token=token).first()
authenticate · Database
2 ms
apps/mcp/tools.py:175
names = list(Environment.objects.filter(project=self.project).values_list("name", flat=True))
Tools.scope · Database
2 ms

Fixtures

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

Database

9 queries · 4 ms
No repeated queries.

Biggest pieces of work

call test body
apps/mcp/tests.py:199
32 ms
call _post_teardown
django/test/testcases.py:1240
4 ms
call _pre_setup
django/test/testcases.py:1164
2 ms
teardown pytest internals 1 ms

Reliability

5 results · 0 CI failures · 0 local failures

This test hasn't failed recently.

History

Latest 5 results, oldest first in the strip
When Environment Outcome Duration Commit
an hour ago CI github-actions:test passed 41 ms 9caa567 main Profile
an hour ago CI github-actions:test passed 40 ms ec75501 main Profile
8 hours ago CI github-actions:test passed 44 ms d2c12e5 main Profile
8 hours ago CI github-actions:test passed 19 ms 0b902f6 main Profile
8 hours ago CI github-actions:test passed 38 ms 78a4357 main Profile