Tests / apps/mcp/tests.py
McpTest::test_initialize_with_older_and_unknown_versions
First seen 3 weeks ago in 78a4357
CI
github-actions:test
12 runs
Average
38 ms
median 40 ms
max 58 ms
max 58 ms
Phases
Setup 0.69 ms
Call 37 ms
Teardown 0.15 ms
Categories
Database 10 ms
Other (Libraries, Unsampled, pytest, Serialization) 28 ms
9 database queries per run
Needs 29 KB of memory (max 304 KB)
Duration per run
Where the time goes
Latest run in ci:github-actions:test, 16 hours ago ·
open run
call39 ms97.7%
McpTest.test_initialize_with_older_and_unknown_versionsapps/mcp/tests.py:98 self.rpc("initialize", {"protocolVersion": "2025-03-26"})["result"]["protocolVersion"], "2025-03-26"34 ms83.7%
McpTest.rpcapps/mcp/tests.py:7526 ms65.1%
McpTest.postapps/mcp/tests.py:67 return self.client.post(26 ms65.1%
Client.postdjango/test/client.py:115326 ms65.1%
RequestFactory.postdjango/test/client.py:49926 ms65.1%
RequestFactory.genericdjango/test/client.py:67126 ms65.1%
Client.requestdjango/test/client.py:108226 ms65.1%
ClientHandler.__call__django/test/client.py:17319 ms46.5%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6219 ms46.5%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10419 ms46.5%
WhiteNoise.add_fileswhitenoise/base.py:10819 ms46.5%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12017 ms41.9%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:13117 ms41.9%
WhiteNoise.get_static_filewhitenoise/base.py:20817 ms41.9%
StaticFile.__init__whitenoise/responders.py:736 ms14.0%
StaticFile.get_headerswhitenoise/responders.py:1764 ms9.3%
formatdate<stdlib>/email/utils.py:2664 ms9.3%
format_datetime<stdlib>/email/utils.py:2842 ms4.7%
format_datetime<stdlib>/email/utils.py:2752 ms4.7%
StaticFile.get_headerswhitenoise/responders.py:1782 ms4.7%
parsedate<stdlib>/email/_parseaddr.py:1872 ms4.7%
StaticFile.__init__whitenoise/responders.py:744 ms9.3%
Headers.__getitem__<stdlib>/wsgiref/headers.py:832 ms4.7%
parsedate<stdlib>/email/_parseaddr.py:1852 ms4.7%
StaticFile.__init__whitenoise/responders.py:774 ms9.3%
StaticFile.get_alternativeswhitenoise/responders.py:2004 ms9.3%
__init____init__:-12 ms4.7%
StaticFile.__init__whitenoise/responders.py:722 ms4.7%
StaticFile.get_file_statswhitenoise/responders.py:1612 ms4.7%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1152 ms4.7%
scantreewhitenoise/base.py:2622 ms4.7%
scantreewhitenoise/base.py:2622 ms4.7%
scantreewhitenoise/base.py:2622 ms4.7%
scantreewhitenoise/base.py:2622 ms4.7%
scantreewhitenoise/base.py:2622 ms4.7%
scantreewhitenoise/base.py:2642 ms4.7%
ClientHandler.__call__django/test/client.py:1864 ms9.3%
BaseHandler.get_responsedjango/core/handlers/base.py:1414 ms9.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms9.3%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:1304 ms9.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms9.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms9.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms9.3%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:1234 ms9.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms9.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms9.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms9.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms9.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms9.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms9.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms9.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms9.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms9.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms9.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms9.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms9.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms9.3%
AccountMiddleware.<locals>.middlewareallauth/account/middleware.py:344 ms9.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms9.3%
BaseHandler._get_responsedjango/core/handlers/base.py:1984 ms9.3%
csrf_exempt.<locals>._view_wrapperdjango/views/decorators/csrf.py:654 ms9.3%
mcpapps/mcp/urls.py:1254 ms9.3%
authenticateapps/mcp/urls.py:57 SecretTokens.objects.filter(token=token).update(date_last_used=timezone.now())4 ms9.3%
QuerySet.updatedjango/db/models/query.py:13004 ms9.3%
SQLUpdateCompiler.execute_sqldjango/db/models/sql/compiler.py:21114 ms9.3%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16244 ms9.3%
CursorWrapper.executedjango/db/backends/utils.py:794 ms9.3%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:924 ms9.3%
CursorWrapper._executedjango/db/backends/utils.py:1054 ms9.3%
Cursor.executepsycopg/cursor.py:1134 ms9.3%
Connection.waitpsycopg/connection.py:4954 ms9.3%
BaseCursor._execute_genpsycopg/_cursor_base.py:2064 ms9.3%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2862 ms4.7%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:782 ms4.7%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:3182 ms4.7%
ClientHandler.__call__django/test/client.py:2072 ms4.7%
HttpResponseBase.closedjango/http/response.py:3412 ms4.7%
ClientHandler.__call__django/test/client.py:2082 ms4.7%
Signal.connectdjango/dispatch/dispatcher.py:1082 ms4.7%
_make_iddjango/dispatch/dispatcher.py:142 ms4.7%
McpTest.rpcapps/mcp/tests.py:77 body = response.json()7 ms18.6%
McpTest.postapps/mcp/tests.py:67 return self.client.post(6 ms14.0%
Client.postdjango/test/client.py:11536 ms14.0%
RequestFactory.postdjango/test/client.py:4996 ms14.0%
RequestFactory.genericdjango/test/client.py:6714 ms9.3%
Client.requestdjango/test/client.py:10824 ms9.3%
ClientHandler.__call__django/test/client.py:1864 ms9.3%
BaseHandler.get_responsedjango/core/handlers/base.py:1414 ms9.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms9.3%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:1304 ms9.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms9.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms9.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms9.3%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:1234 ms9.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms9.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms9.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms9.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms9.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms9.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms9.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms9.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms9.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms9.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms9.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms9.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms9.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:552 ms4.7%
AccountMiddleware.<locals>.middlewareallauth/account/middleware.py:342 ms4.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:552 ms4.7%
BaseHandler._get_responsedjango/core/handlers/base.py:1982 ms4.7%
csrf_exempt.<locals>._view_wrapperdjango/views/decorators/csrf.py:652 ms4.7%
mcpapps/mcp/urls.py:1252 ms4.7%
authenticateapps/mcp/urls.py:55 project = Project.objects.filter(secrettokens__token=token).first()2 ms4.7%
QuerySet.firstdjango/db/models/query.py:11452 ms4.7%
QuerySet.__iter__django/db/models/query.py:3902 ms4.7%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms4.7%
ModelIterable.__iter__django/db/models/query.py:952 ms4.7%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms4.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms4.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms4.7%
RequestFactory.genericdjango/test/client.py:6592 ms4.7%
ClientMixin._parse_jsondjango/test/client.py:9522 ms4.7%
TransactionTestCase._post_teardowndjango/test/testcases.py:1240 self._fixture_teardown()4 ms9.3%
TestCase._fixture_teardowndjango/test/testcases.py:14942 ms4.7%
TestCase._should_check_constraintsdjango/test/testcases.py:15032 ms4.7%
DatabaseWrapper.is_usabledjango/db/backends/postgresql/base.py:4922 ms4.7%
Cursor.executepsycopg/cursor.py:1132 ms4.7%
Connection.waitpsycopg/connection.py:4952 ms4.7%
TestCase._fixture_teardowndjango/test/testcases.py:14952 ms4.7%
DatabaseWrapper.check_constraintsdjango/db/backends/postgresql/base.py:4832 ms4.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms4.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms4.7%
CursorWrapper._executedjango/db/backends/utils.py:1032 ms4.7%
Cursor.executepsycopg/cursor.py:1132 ms4.7%
Connection.waitpsycopg/connection.py:4952 ms4.7%
Estimated from 21 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
|
26 ms |
|
apps/mcp/urls.py:57
SecretTokens.objects.filter(token=token).update(date_last_used=timezone.now())
authenticate
· Database
|
4 ms |
|
apps/mcp/tests.py:77
body = response.json()
McpTest.rpc
· Libraries
|
2 ms |
|
apps/mcp/urls.py:55
project = Project.objects.filter(secrettokens__token=token).first()
authenticate
· Database
|
2 ms |
Fixtures
Exact setup time| _template_string_if_invalid_marker function | 0.09 ms |
| _dj_autoclear_mailbox function | 0.05 ms |
| _django_db_marker function | 0.05 ms |
| _django_set_urlconf function | 0.04 ms |
| _live_server_helper 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:98
|
34 ms |
|
call _post_teardown
django/test/testcases.py:1240
|
4 ms |
| call pytest internals | 2 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 | 40 ms | Profile |
| 1 week, 5 days ago | CI github-actions:test | passed | 22 ms | Profile |
| 2 weeks, 1 day ago | CI github-actions:test | passed | 44 ms | Profile |
| 2 weeks, 1 day ago | CI github-actions:test | passed | 33 ms | Profile |
| 2 weeks, 1 day ago | CI github-actions:test | passed | 51 ms | Profile |
| 2 weeks, 2 days ago | CI github-actions:test | passed | 19 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 | 39 ms | Profile |
| 2 weeks, 6 days ago | CI github-actions:test | passed | 40 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 50 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 20 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 58 ms | Profile |