Tests / apps/mcp/tests.py
McpTest::test_unknown_environment_is_a_tool_error
First seen 3 weeks ago in 78a4357
CI
github-actions:test
12 runs
Average
35 ms
median 38 ms
max 48 ms
max 48 ms
Phases
Setup 0.68 ms
Call 34 ms
Teardown 0.84 ms
Categories
Database 12 ms
App code 0.13 ms
Other (Libraries, Unsampled, pytest) 23 ms
9 database queries per run
Needs 198 KB of memory (max 488 KB)
Duration per run
Where the time goes
Latest run in ci:github-actions:test, 16 hours ago ·
open run
call37 ms96.5%
McpTest.test_unknown_environment_is_a_tool_errorapps/mcp/tests.py:200 body = self.rpc("tools/call", {"name": "get_overview", "arguments": {"environment": "ci:nope"}})32 ms82.7%
McpTest.rpcapps/mcp/tests.py:7532 ms82.7%
McpTest.postapps/mcp/tests.py:67 return self.client.post(32 ms82.7%
Client.postdjango/test/client.py:115332 ms82.7%
RequestFactory.postdjango/test/client.py:49932 ms82.7%
RequestFactory.genericdjango/test/client.py:67132 ms82.7%
Client.requestdjango/test/client.py:108232 ms82.7%
ClientHandler.__call__django/test/client.py:17324 ms62.0%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6224 ms62.0%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10424 ms62.0%
WhiteNoise.add_fileswhitenoise/base.py:10824 ms62.0%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12021 ms55.1%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:13121 ms55.1%
WhiteNoise.get_static_filewhitenoise/base.py:20813 ms34.5%
StaticFile.__init__whitenoise/responders.py:738 ms20.7%
StaticFile.get_headerswhitenoise/responders.py:1765 ms13.8%
formatdate<stdlib>/email/utils.py:2665 ms13.8%
StaticFile.get_headerswhitenoise/responders.py:1783 ms6.9%
parsedate<stdlib>/email/_parseaddr.py:1853 ms6.9%
StaticFile.__init__whitenoise/responders.py:773 ms6.9%
StaticFile.get_alternativeswhitenoise/responders.py:2033 ms6.9%
Headers.__setitem__<stdlib>/wsgiref/headers.py:643 ms6.9%
Headers.__init__<stdlib>/wsgiref/headers.py:443 ms6.9%
StaticFile.__init__whitenoise/responders.py:743 ms6.9%
Headers.__getitem__<stdlib>/wsgiref/headers.py:833 ms6.9%
WhiteNoise.get_static_filewhitenoise/base.py:2038 ms20.7%
WhiteNoise.add_cache_headerswhitenoise/base.py:2248 ms20.7%
WhiteNoiseMiddleware.immutable_file_testwhitenoise/middleware.py:1768 ms20.7%
WhiteNoiseMiddleware.get_static_urlwhitenoise/middleware.py:1978 ms20.7%
URLMixin.urldebug_toolbar/panels/staticfiles.py:205 ms13.8%
HashedFilesMixin.urldjango/contrib/staticfiles/storage.py:2053 ms6.9%
HashedFilesMixin._urldjango/contrib/staticfiles/storage.py:1863 ms6.9%
FileSystemStorage.urldjango/core/files/storage/filesystem.py:2093 ms6.9%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1153 ms6.9%
scantreewhitenoise/base.py:2623 ms6.9%
scantreewhitenoise/base.py:2623 ms6.9%
scantreewhitenoise/base.py:2623 ms6.9%
scantreewhitenoise/base.py:2623 ms6.9%
scantreewhitenoise/base.py:2623 ms6.9%
scantreewhitenoise/base.py:2643 ms6.9%
ClientHandler.__call__django/test/client.py:1868 ms20.7%
BaseHandler.get_responsedjango/core/handlers/base.py:1418 ms20.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:558 ms20.7%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:1308 ms20.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:558 ms20.7%
MiddlewareMixin.__call__django/utils/deprecation.py:3098 ms20.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:558 ms20.7%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:1238 ms20.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:558 ms20.7%
MiddlewareMixin.__call__django/utils/deprecation.py:3098 ms20.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:558 ms20.7%
MiddlewareMixin.__call__django/utils/deprecation.py:3098 ms20.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:558 ms20.7%
MiddlewareMixin.__call__django/utils/deprecation.py:3098 ms20.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:558 ms20.7%
MiddlewareMixin.__call__django/utils/deprecation.py:3098 ms20.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:558 ms20.7%
MiddlewareMixin.__call__django/utils/deprecation.py:3098 ms20.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:558 ms20.7%
MiddlewareMixin.__call__django/utils/deprecation.py:3098 ms20.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:558 ms20.7%
AccountMiddleware.<locals>.middlewareallauth/account/middleware.py:348 ms20.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:558 ms20.7%
BaseHandler._get_responsedjango/core/handlers/base.py:1988 ms20.7%
csrf_exempt.<locals>._view_wrapperdjango/views/decorators/csrf.py:658 ms20.7%
mcpapps/mcp/urls.py:1475 ms13.8%
handleapps/mcp/urls.py:1155 ms13.8%
call_toolapps/mcp/urls.py:755 ms13.8%
Tools.callapps/mcp/tools.py:1885 ms13.8%
Tools.get_overviewapps/mcp/tools.py:2115 ms13.8%
Tools.scopeapps/mcp/tools.py:1803 ms6.9%
resolve_scopeapps/projects/analytics.py:198 selected = Environment.objects.filter(project=project, name=env).first()3 ms6.9%
QuerySet.firstdjango/db/models/query.py:11453 ms6.9%
QuerySet.__iter__django/db/models/query.py:3903 ms6.9%
QuerySet._fetch_alldjango/db/models/query.py:20003 ms6.9%
ModelIterable.__iter__django/db/models/query.py:953 ms6.9%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16113 ms6.9%
SQLCompiler.as_sqldjango/db/models/sql/compiler.py:7673 ms6.9%
SQLCompiler.pre_sql_setupdjango/db/models/sql/compiler.py:863 ms6.9%
SQLCompiler.setup_querydjango/db/models/sql/compiler.py:753 ms6.9%
SQLCompiler.get_selectdjango/db/models/sql/compiler.py:3173 ms6.9%
SQLCompiler.compiledjango/db/models/sql/compiler.py:5743 ms6.9%
Col.as_sqldjango/db/models/expressions.py:13233 ms6.9%
Tools.scopeapps/mcp/tools.py:182 names = list(Environment.objects.filter(project=self.project).values_list("name", flat=True))3 ms6.9%
QuerySet.__iter__django/db/models/query.py:3903 ms6.9%
QuerySet._fetch_alldjango/db/models/query.py:20003 ms6.9%
FlatValuesListIterable.__iter__django/db/models/query.py:2773 ms6.9%
SQLCompiler.results_iterdjango/db/models/sql/compiler.py:15733 ms6.9%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16113 ms6.9%
SQLCompiler.as_sqldjango/db/models/sql/compiler.py:7953 ms6.9%
SQLCompiler.compiledjango/db/models/sql/compiler.py:5783 ms6.9%
WhereNode.as_sqldjango/db/models/sql/where.py:1513 ms6.9%
SQLCompiler.compiledjango/db/models/sql/compiler.py:5783 ms6.9%
mcpapps/mcp/urls.py:1253 ms6.9%
authenticateapps/mcp/urls.py:55 project = Project.objects.filter(secrettokens__token=token).first()3 ms6.9%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:873 ms6.9%
BaseManager.get_querysetdjango/db/models/manager.py:1553 ms6.9%
TransactionTestCase._post_teardowndjango/test/testcases.py:1240 self._fixture_teardown()5 ms13.8%
TestCase._fixture_teardowndjango/test/testcases.py:14955 ms13.8%
DatabaseWrapper.check_constraintsdjango/db/backends/postgresql/base.py:4833 ms6.9%
CursorWrapper.executedjango/db/backends/utils.py:793 ms6.9%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:923 ms6.9%
CursorWrapper._executedjango/db/backends/utils.py:1033 ms6.9%
Cursor.executepsycopg/cursor.py:1133 ms6.9%
Connection.waitpsycopg/connection.py:4953 ms6.9%
DatabaseWrapper.check_constraintsdjango/db/backends/postgresql/base.py:4843 ms6.9%
CursorWrapper.executedjango/db/backends/utils.py:793 ms6.9%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:923 ms6.9%
CursorWrapper._executedjango/db/backends/utils.py:1033 ms6.9%
Cursor.executepsycopg/cursor.py:1133 ms6.9%
Connection.waitpsycopg/connection.py:4953 ms6.9%
teardown0.64 ms1.7%
TestCase.tearDownClassdjango/test/testcases.py:1453 cls._rollback_atomics(cls.cls_atomics)0.64 ms1.7%
TestCase._rollback_atomicsdjango/test/testcases.py:14050.64 ms1.7%
Atomic.__exit__django/db/transaction.py:2950.64 ms1.7%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:260.64 ms1.7%
BaseDatabaseWrapper.rollbackdjango/db/backends/base/base.py:3370.64 ms1.7%
BaseDatabaseWrapper._rollbackdjango/db/backends/base/base.py:3080.64 ms1.7%
Connection.rollbackpsycopg/connection.py:3140.64 ms1.7%
Connection.waitpsycopg/connection.py:4950.64 ms1.7%
Estimated from 15 samples; phase durations are exact. Frames from pytest and pluggy are
hidden
.
Hot lines in your code
|
apps/mcp/tests.py:67
return self.client.post(
McpTest.post
· Libraries
|
24 ms |
|
apps/mcp/urls.py:55
project = Project.objects.filter(secrettokens__token=token).first()
authenticate
· Database
|
3 ms |
|
apps/projects/analytics.py:198
selected = Environment.objects.filter(project=project, name=env).first()
resolve_scope
· Database
|
3 ms |
|
apps/mcp/tools.py:182
names = list(Environment.objects.filter(project=self.project).values_list("name", flat=True))
Tools.scope
· Database
|
3 ms |
Fixtures
Exact setup time| _live_server_helper function | 0.05 ms |
| _dj_autoclear_mailbox function | 0.05 ms |
| _django_db_marker function | 0.04 ms |
| _django_set_urlconf function | 0.04 ms |
| _template_string_if_invalid_marker function | 0.04 ms |
| _django_clear_site_cache function | 0.03 ms |
| monkeypatch function | 0.02 ms |
Database
9 queries · 3 msNo repeated queries.
Biggest pieces of work
|
call test body
apps/mcp/tests.py:200
|
32 ms |
|
call _post_teardown
django/test/testcases.py:1240
|
5 ms |
|
teardown tearDownClass
django/test/testcases.py:1453
|
0.64 ms |
Reliability
12 results · 0 CI failures · 0 local failuresThis test hasn't failed recently.
History
Latest 12 results, oldest first in the strip| When | Environment | Outcome | Duration | |
|---|---|---|---|---|
| 16 hours ago | CI github-actions:test | passed | 38 ms | Profile |
| 1 week, 5 days ago | CI github-actions:test | passed | 18 ms | Profile |
| 2 weeks, 1 day ago | CI github-actions:test | passed | 38 ms | Profile |
| 2 weeks, 1 day ago | CI github-actions:test | passed | 31 ms | Profile |
| 2 weeks, 1 day ago | CI github-actions:test | passed | 48 ms | Profile |
| 2 weeks, 2 days ago | CI github-actions:test | passed | 25 ms | Profile |
| 2 weeks, 4 days ago | CI github-actions:test | passed | 41 ms | Profile |
| 2 weeks, 6 days ago | CI github-actions:test | passed | 41 ms | Profile |
| 2 weeks, 6 days ago | CI github-actions:test | passed | 40 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 44 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 19 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 38 ms | Profile |