← Về thư mục
tests/test_mcp_client.py
- _HTTPHeaders · class · L39-L45 — class _HTTPHeaders(dict)
- get · method · L40-L45 — def get(self, key, default=None)
- test_portable_openai4s_python_is_resolved_only_at_spawn_time · function · L48-L59 — def test_portable_openai4s_python_is_resolved_only_at_spawn_time()
- test_an_explicit_interpreter_for_an_in_tree_module_is_not_overridden · function · L62-L77 — def test_an_explicit_interpreter_for_an_in_tree_module_is_not_overridden()
- _BoundedTransport · class · L80-L92 — class _BoundedTransport
- init · method · L88-L89 — def init(self)
- settimeout · method · L91-L92 — def settimeout(self, value)
- _HTTPResponse · class · L95-L118 — class _HTTPResponse
- init · method · L96-L102 — def init(self, status, body=b"", headers=None)
- enter · method · L104-L105 — def enter(self)
- exit · method · L107-L108 — def exit(self, *_args)
- getcode · method · L110-L111 — def getcode(self)
- read · method · L113-L118 — def read(self, size=-1)
- _rpc_response · function · L121-L128 — def _rpc_response(message, *, session=None, media_type="application/json")
- _permit_fake_http · function · L131-L137 — def _permit_fake_http(monkeypatch, opener)
- _socketpair_deadline_opener · function · L140-L161 — def _socketpair_deadline_opener( exchange: HTTPExchangeDeadline, client: socket.socket, ) -> urllib.request.OpenerDirector
- _SocketpairConnection · class · L146-L156 — class _SocketpairConnection(_DeadlineHTTPSConnection)
- init · method · L147-L151 — def init(self, args, *kwargs): # There is no TLS handshake on this socketpair. Loading system CA # files must not consume the short deadline meant for body reads.
- connect · method · L153-L156 — def connect(self) -> None
- test_absolute_exchange_deadline_interrupts_opener_during_response_headers · function · L172-L227 — def test_absolute_exchange_deadline_interrupts_opener_during_response_headers( initial_response, )
- drip_header · function · L187-L196 — def drip_header() -> None: # Every byte arrives well inside urllib's relative socket timeout. A # legacy opener therefore remains in
HTTPResponse.begin for the # whole two-second producer lifetime instead of timing out at 150 ms.
- test_absolute_exchange_deadline_preserves_http_status_errors · function · L231-L253 — def test_absolute_exchange_deadline_preserves_http_status_errors()
- _Opener · class · L241-L245 — class _Opener
- open · method · L242-L245 — def open(self, _request, timeout=None)
- test_absolute_exchange_deadline_closes_a_response_rejected_after_open · function · L257-L281 — def test_absolute_exchange_deadline_closes_a_response_rejected_after_open()
- _Response · class · L260-L265 — class _Response
- init · method · L261-L262 — def init(self)
- close · method · L264-L265 — def close(self)
- _Opener · class · L269-L273 — class _Opener
- open · method · L270-L273 — def open(self, _request, timeout=None)
- test_absolute_exchange_deadline_preserves_a_normal_header_and_body_response · function · L285-L306 — def test_absolute_exchange_deadline_preserves_a_normal_header_and_body_response()
- test_streamable_http_uses_the_exchange_deadline_during_initialize · function · L310-L350 — def test_streamable_http_uses_the_exchange_deadline_during_initialize( monkeypatch, )
- _SocketpairExchange · class · L321-L327 — class _SocketpairExchange(HTTPExchangeDeadline)
- init · method · L322-L324 — def init(self, timeout)
- build_opener · method · L326-L327 — def build_opener(self, *_handlers)
- test_streamable_http_body_reader_prefers_one_raw_read_per_deadline_check · function · L354-L397 — def test_streamable_http_body_reader_prefers_one_raw_read_per_deadline_check()
- _Socket · class · L357-L362 — class _Socket
- init · method · L358-L359 — def init(self)
- settimeout · method · L361-L362 — def settimeout(self, value)
- _Raw · class · L364-L366 — class _Raw
- init · method · L365-L366 — def init(self, sock)
- _FP · class · L368-L370 — class _FP
- init · method · L369-L370 — def init(self, sock)
- _Read1OnlyResponse · class · L372-L385 — class _Read1OnlyResponse
- init · method · L373-L378 — def init(self)
- read1 · method · L380-L382 — def read1(self, _size)
- read · method · L384-L385 — def read(self, _size=-1)
- test_streamable_http_body_reader_stops_when_the_transport_retires · function · L401-L479 — def test_streamable_http_body_reader_stops_when_the_transport_retires()
- _RetiredSocket · class · L413-L424 — class _RetiredSocket
- init · method · L414-L416 — def init(self)
- settimeout · method · L418-L421 — def settimeout(self, value)
- fileno · method · L423-L424 — def fileno(self)
- _Raw · class · L426-L428 — class _Raw
- init · method · L427-L428 — def init(self, sock)
- _FP · class · L430-L432 — class _FP
- init · method · L431-L432 — def init(self, sock)
- _EndOfBodyClosingResponse · class · L434-L465 — class _EndOfBodyClosingResponse
- init · method · L435-L442 — def init(self, body)
- isclosed · method · L444-L445 — def isclosed(self)
- read1 · method · L447-L462 — def read1(self, size=-1): # The stdlib signature, so a reader that drops the size argument # or passes the default -1 is modelled instead of silently # returning b"" from a backwards slice.
- read · method · L464-L465 — def read(self, _size=-1)
- test_streamable_http_body_watchdog_interrupts_a_chunked_slow_drip · function · L483-L534 — def test_streamable_http_body_watchdog_interrupts_a_chunked_slow_drip(monkeypatch): # Exercise the watchdog deliberately; a shorter socket timeout racing it # is a separate contract below. Keep this real blocked read longer-lived.
- drip_partial_chunk_line · function · L499-L506 — def drip_partial_chunk_line() -> None
- test_streamable_http_socket_timeout_preceding_watchdog_uses_mcp_error · function · L538-L550 — def test_streamable_http_socket_timeout_preceding_watchdog_uses_mcp_error()
- timed_out · function · L541-L542 — def timed_out(_size)
- test_streamable_http_slow_drip_cannot_refresh_the_absolute_timeout · function · L554-L614 — def test_streamable_http_slow_drip_cannot_refresh_the_absolute_timeout(monkeypatch)
- _Clock · class · L561-L566 — class _Clock
- monotonic · method · L565-L566 — def monotonic(cls)
- _Socket · class · L568-L573 — class _Socket
- init · method · L569-L570 — def init(self)
- settimeout · method · L572-L573 — def settimeout(self, value)
- _Raw · class · L575-L577 — class _Raw
- init · method · L576-L577 — def init(self, sock)
- _FP · class · L579-L581 — class _FP
- init · method · L580-L581 — def init(self, sock)
- _SlowDripResponse · class · L583-L596 — class _SlowDripResponse
- init · method · L584-L588 — def init(self)
- read1 · method · L590-L593 — def read1(self, _size)
- read · method · L595-L596 — def read(self, _size=-1)
- test_streamable_http_rejects_truncated_and_unbounded_bodies · function · L618-L649 — def test_streamable_http_rejects_truncated_and_unbounded_bodies()
- _ShortResponse · class · L619-L631 — class _ShortResponse(_HTTPResponse)
- init · method · L620-L626 — def init(self, body, declared)
- read · method · L628-L631 — def read(self, size=-1)
- _UnboundedResponse · class · L633-L637 — class _UnboundedResponse
- read · method · L636-L637 — def read(self, _size=-1)
- test_streamable_http_watchdog_failures_remain_timeouts · function · L654-L683 — def test_streamable_http_watchdog_failures_remain_timeouts(failure_point)
- _Transport · class · L657-L661 — class _Transport
- settimeout · method · L658-L661 — def settimeout(self, _value)
- _Response · class · L663-L677 — class _Response
- init · method · L669-L671 — def init(self)
- read1 · method · L673-L677 — def read1(self, _size)
- test_streamable_http_complete_body_survives_a_late_clock_without_expiry · function · L687-L696 — def test_streamable_http_complete_body_survives_a_late_clock_without_expiry()
- test_streamable_http_observed_truncation_survives_a_late_clock_without_expiry · function · L700-L711 — def test_streamable_http_observed_truncation_survives_a_late_clock_without_expiry()
- test_streamable_http_body_cap_covers_header_stream_and_exact_boundary · function · L715-L731 — def test_streamable_http_body_cap_covers_header_stream_and_exact_boundary( monkeypatch, )
- test_connector_environment_is_allowlisted_and_explicit_env_is_the_secret_boundary · function · L734-L765 — def test_connector_environment_is_allowlisted_and_explicit_env_is_the_secret_boundary()
- test_connector_environment_has_a_path_fallback_and_rejects_invalid_entries · function · L768-L778 — def test_connector_environment_has_a_path_fallback_and_rejects_invalid_entries()
- test_manager_connect_never_passes_ambient_secrets_to_popen · function · L781-L807 — def test_manager_connect_never_passes_ambient_secrets_to_popen(monkeypatch)
- CapturingConnection · class · L784-L786 — class CapturingConnection
- init · method · L785-L786 — def init(self, command, env=None, cwd=None, *, timeout=None)
- test_connection_uses_standard_resource_and_prompt_method_shapes · function · L810-L837 — def test_connection_uses_standard_resource_and_prompt_method_shapes()
- request · function · L814-L821 — def request(method, params=None)
- test_bundled_server_supports_resources_and_prompts_end_to_end · function · L840-L870 — def test_bundled_server_supports_resources_and_prompts_end_to_end()
- _silent_server_config · function · L873-L901 — def _silent_server_config(tmp_path, *, behaviour: str) -> dict
- test_a_silent_connector_times_out_instead_of_holding_its_caller_forever · function · L904-L924 — def test_a_silent_connector_times_out_instead_of_holding_its_caller_forever(tmp_path)
- test_a_late_reply_is_discarded_rather_than_read_as_the_next_answer · function · L927-L951 — def test_a_late_reply_is_discarded_rather_than_read_as_the_next_answer(tmp_path)
- test_a_closed_connection_wakes_its_waiters · function · L954-L973 — def test_a_closed_connection_wakes_its_waiters(tmp_path)
- call · function · L961-L965 — def call()
- test_editing_or_disabling_a_connector_drops_its_cached_process · function · L976-L1032 — def test_editing_or_disabling_a_connector_drops_its_cached_process(tmp_path)
- _Hub · class · L988-L993 — class _Hub
- emitter · method · L989-L990 — def emitter(self, root_frame_id)
- broadcast · method · L992-L993 — def broadcast(self, root_frame_id, event)
- test_streamable_http_uses_fresh_headers_and_preserves_structured_content · function · L1036-L1146 — def test_streamable_http_uses_fresh_headers_and_preserves_structured_content( monkeypatch, )
- _Opener · class · L1055-L1100 — class _Opener
- open · method · L1056-L1100 — def open(self, request, timeout=None)
- test_shutdown_epoch_rejects_an_old_store_connection_that_finishes_late · function · L1150-L1212 — def test_shutdown_epoch_rejects_an_old_store_connection_that_finishes_late( monkeypatch, )
- _Connection · class · L1160-L1175 — class _Connection
- init · method · L1163-L1165 — def init(self, generation)
- faulted · method · L1167-L1168 — def faulted(self)
- list_tools · method · L1170-L1171 — def list_tools(self)
- close · method · L1173-L1175 — def close(self)
- connect · function · L1177-L1183 — def connect(config)
- old_call · function · L1188-L1192 — def old_call()
- test_disconnect_epoch_rejects_inflight_connection_from_pre_rotation_config · function · L1216-L1270 — def test_disconnect_epoch_rejects_inflight_connection_from_pre_rotation_config( monkeypatch, )
- _Connection · class · L1225-L1240 — class _Connection
- init · method · L1228-L1230 — def init(self, generation)
- faulted · method · L1232-L1233 — def faulted(self)
- list_tools · method · L1235-L1236 — def list_tools(self)
- close · method · L1238-L1240 — def close(self)
- connect · function · L1242-L1247 — def connect(config)
- old_call · function · L1252-L1256 — def old_call()
- test_streamable_http_404_reinitializes_the_session_once · function · L1274-L1315 — def test_streamable_http_404_reinitializes_the_session_once(monkeypatch)
- _Opener · class · L1278-L1300 — class _Opener
- open · method · L1279-L1300 — def open(self, request, timeout=None)
- test_streamable_http_refuses_redirect_without_leaking_headers · function · L1319-L1346 — def test_streamable_http_refuses_redirect_without_leaking_headers(monkeypatch)
- _Opener · class · L1322-L1330 — class _Opener
- open · method · L1323-L1330 — def open(self, request, timeout=None)
- test_datapro_web_route_calls_search_saves_result_and_never_projects_key · function · L1350-L1515 — def test_datapro_web_route_calls_search_saves_result_and_never_projects_key( tmp_path, monkeypatch, caplog )
- _Hub · class · L1357-L1362 — class _Hub
- emitter · method · L1358-L1359 — def emitter(self, root_frame_id)
- broadcast · method · L1361-L1362 — def broadcast(self, root_frame_id, event)
- _Manager · class · L1378-L1398 — class _Manager
- disconnect · method · L1379-L1380 — def disconnect(self, connector_id, cache_scope=None)
- call_tool · method · L1382-L1398 — def call_tool(self, connector_id, config, tool, args)
- fail_upload · function · L1480-L1481 — def fail_upload(args, *kwargs)
- test_managed_product_config_routes_project_only_local_credential_state · function · L1518-L1613 — def test_managed_product_config_routes_project_only_local_credential_state(tmp_path)
- _Hub · class · L1525-L1530 — class _Hub
- emitter · method · L1526-L1527 — def emitter(self, root_frame_id)
- broadcast · method · L1529-L1530 — def broadcast(self, root_frame_id, event)