Test files: 2. Test functions: 94. Described by their authors (docstring or @DisplayName): 3. Where there is no description, the line shows the test name in words and says so.
Latest result: ragleap-integrations-tests (3.10) passed 201 passed, 0 skipped, 0 failed CI job ragleap-integrations-tests (3.12) passed 201 passed, 0 skipped, 0 failed CI job ragleap-integrations-tests (3.11) passed 201 passed, 0 skipped, 0 failed CI job
test_mcp.py — 72 tests 72 passed, 0 failed, 0 skipped
Tests for ragleap_integrations.mcp - configuration, header encoding, x-mcp-header handling, the modern (2026-07-28) and legacy (2025-06-18) request flows, the backward-compatibility detection, discovery, and make_mcp_tools(). A recording fake transport replaces the network, so tests assert on the exact URL, headers and JSON body each request carries, and on the rule that rejected input never reaches the transport and that no server-supplied text appears in a result's error.
test_valid_config_dedupes_allowlist_keeping_orderpassed
Valid config dedupes allowlist keeping order (no description in the source; shown from the name)test_bad_server_names_rejectedpassed
Bad server names rejected (no description in the source; shown from the name)test_bad_server_urls_rejectedpassed
Bad server urls rejected (no description in the source; shown from the name)test_bad_tokens_rejectedpassed
Bad tokens rejected (no description in the source; shown from the name)test_duplicate_server_names_and_empty_lists_rejectedpassed
Duplicate server names and empty lists rejected (no description in the source; shown from the name)test_bad_allowlist_entries_rejectedpassed
Bad allowlist entries rejected (no description in the source; shown from the name)test_bad_limits_rejectedpassed
Bad limits rejected (no description in the source; shown from the name)test_plain_values_are_not_encodedpassed
Plain values are not encoded (no description in the source; shown from the name)test_unsafe_values_use_the_base64_sentinelpassed
Unsafe values use the base64 sentinel (no description in the source; shown from the name)test_sentinel_wire_formatpassed
Sentinel wire format (no description in the source; shown from the name)test_header_params_found_in_order_including_nestedpassed
Header params found in order including nested (no description in the source; shown from the name)test_schema_without_annotations_has_nonepassed
Schema without annotations has none (no description in the source; shown from the name)test_invalid_annotations_reject_the_whole_schemapassed
Invalid annotations reject the whole schema (no description in the source; shown from the name)test_annotation_on_the_root_schema_is_rejectedpassed
Annotation on the root schema is rejected (no description in the source; shown from the name)test_header_values_extractionpassed
Header values extraction (no description in the source; shown from the name)test_header_values_reject_unmirrorable_valuespassed
Header values reject unmirrorable values (no description in the source; shown from the name)test_modern_call_sends_the_exact_requestpassed
Modern call sends the exact request (no description in the source; shown from the name)test_no_authorization_header_without_a_tokenpassed
No authorization header without a token (no description in the source; shown from the name)test_non_ascii_tool_name_goes_in_mcp_name_as_base64passed
Non ascii tool name goes in mcp name as base64 (no description in the source; shown from the name)test_x_mcp_header_parameters_are_mirrored_into_headerspassed
X mcp header parameters are mirrored into headers (no description in the source; shown from the name)test_header_mirroring_uses_the_base64_form_when_neededpassed
Header mirroring uses the base64 form when needed (no description in the source; shown from the name)test_no_arguments_means_an_empty_objectpassed
No arguments means an empty object (no description in the source; shown from the name)test_text_parts_are_joined_and_non_text_is_notedpassed
Text parts are joined and non text is noted (no description in the source; shown from the name)test_long_results_are_truncated_with_a_markerpassed
Long results are truncated with a marker (no description in the source; shown from the name)test_is_error_becomes_a_failed_tool_result_with_the_tool_textpassed
Is error becomes a failed tool result with the tool text (no description in the source; shown from the name)test_is_error_without_text_still_failspassed
Is error without text still fails (no description in the source; shown from the name)test_content_must_be_a_listpassed
Content must be a list (no description in the source; shown from the name)test_input_required_result_is_reported_as_unsupportedpassed
Input required result is reported as unsupported (no description in the source; shown from the name)test_event_stream_response_with_a_notification_before_the_resultpassed
Event stream response with a notification before the result (no description in the source; shown from the name)test_event_stream_with_crlf_line_endingspassed
Event stream with crlf line endings (no description in the source; shown from the name)test_event_stream_whose_last_event_has_no_blank_line_is_accepted_at_eofpassed
Event stream whose last event has no blank line is accepted at eof (no description in the source; shown from the name)test_unusable_responses_become_constant_failurespassed
Unusable responses become constant failures (no description in the source; shown from the name)test_event_stream_response_ids_must_matchpassed
Event stream response ids must match (no description in the source; shown from the name)test_json_rpc_error_reports_the_code_but_never_the_server_textpassed
Json rpc error reports the code but never the server text (no description in the source; shown from the name)test_http_error_reports_the_status_but_never_the_bodypassed
Http error reports the status but never the body (no description in the source; shown from the name)test_tool_outside_the_allowlist_is_refused_without_a_requestpassed
Tool outside the allowlist is refused without a request (no description in the source; shown from the name)test_unknown_server_is_refused_without_a_requestpassed
Unknown server is refused without a request (no description in the source; shown from the name)test_bad_arguments_are_refused_without_a_requestpassed
Bad arguments are refused without a request (no description in the source; shown from the name)test_unmirrorable_header_argument_is_refused_without_a_requestpassed
Unmirrorable header argument is refused without a request (no description in the source; shown from the name)test_transport_errors_become_constant_resultspassed
Transport errors become constant results (no description in the source; shown from the name)test_unexpected_exceptions_never_escape_or_leakpassed
Unexpected exceptions never escape or leak (no description in the source; shown from the name)test_default_transport_passes_the_configured_limitspassed
Default transport passes the configured limits (no description in the source; shown from the name)test_legacy_server_is_detected_from_a_400_with_no_json_rpc_bodypassed
Legacy server is detected from a 400 with no json rpc body (no description in the source; shown from the name)test_legacy_requests_carry_the_session_and_negotiated_versionpassed
Legacy requests carry the session and negotiated version (no description in the source; shown from the name)test_legacy_without_a_session_header_still_workspassed
Legacy without a session header still works (no description in the source; shown from the name)test_404_or_405_without_json_rpc_also_means_legacypassed
404 or 405 without json rpc also means legacy (no description in the source; shown from the name)test_modern_json_rpc_errors_are_not_mistaken_for_a_legacy_serverpassed
Modern json rpc errors are not mistaken for a legacy server (no description in the source; shown from the name)test_server_that_is_neither_modern_nor_legacy_gets_a_clear_errorpassed
Server that is neither modern nor legacy gets a clear error (no description in the source; shown from the name)test_a_legacy_servers_own_json_rpc_rejection_means_legacypassed
What a live DeepWiki server answered to the modern request: a 400 withtest_a_400_with_any_non_modern_code_falls_backpassed
A 400 with any non modern code falls back (no description in the source; shown from the name)test_a_400_with_a_recognized_modern_code_is_reported_not_downgradedpassed
A 400 with a recognized modern code is reported not downgraded (no description in the source; shown from the name)test_modern_server_rejecting_arguments_with_a_400_is_not_silently_downgradedpassed
Some servers answer invalid params with 400 and -32602, which the spectest_unsupported_version_code_without_a_usable_list_is_an_errorpassed
Unsupported version code without a usable list is an error (no description in the source; shown from the name)test_unsupported_version_error_with_a_legacy_overlap_falls_backpassed
Unsupported version error with a legacy overlap falls back (no description in the source; shown from the name)test_unsupported_version_error_without_overlap_is_an_error_and_no_handshakepassed
Unsupported version error without overlap is an error and no handshake (no description in the source; shown from the name)test_legacy_server_answering_with_a_version_we_do_not_support_is_refusedpassed
Legacy server answering with a version we do not support is refused (no description in the source; shown from the name)test_legacy_initialize_error_and_notification_failurepassed
Legacy initialize error and notification failure (no description in the source; shown from the name)test_era_is_remembered_after_a_successpassed
Era is remembered after a success (no description in the source; shown from the name)test_a_failed_legacy_attempt_does_not_pin_the_server_to_legacypassed
A failed legacy attempt does not pin the server to legacy (no description in the source; shown from the name)test_discovery_request_shape_and_allowlist_filteringpassed
Discovery request shape and allowlist filtering (no description in the source; shown from the name)test_discovery_follows_next_cursor_and_stops_when_everything_is_foundpassed
Discovery follows next cursor and stops when everything is found (no description in the source; shown from the name)test_discovery_page_loop_is_boundedpassed
Discovery page loop is bounded (no description in the source; shown from the name)test_discovery_skips_unusable_tools_with_reasonspassed
Discovery skips unusable tools with reasons (no description in the source; shown from the name)test_discovery_caps_descriptions_and_defaults_missing_schemaspassed
Discovery caps descriptions and defaults missing schemas (no description in the source; shown from the name)test_discovery_failure_raises_a_constant_messagepassed
Discovery failure raises a constant message (no description in the source; shown from the name)test_discovery_with_a_malformed_tool_list_fails_cleanlypassed
Discovery with a malformed tool list fails cleanly (no description in the source; shown from the name)test_discovered_tools_are_ragleap_tools_and_the_list_is_a_snapshotpassed
Discovered tools are ragleap tools and the list is a snapshot (no description in the source; shown from the name)test_owner_supplied_specs_use_no_network_at_setuppassed
Owner supplied specs use no network at setup (no description in the source; shown from the name)test_bad_owner_specs_are_configuration_errorspassed
Bad owner specs are configuration errors (no description in the source; shown from the name)test_exposed_names_are_sanitized_truncated_and_collisions_are_errorspassed
Exposed names are sanitized truncated and collisions are errors (no description in the source; shown from the name)test_tool_handlers_never_raisepassed
Tool handlers never raise (no description in the source; shown from the name)test_a_model_chosen_argument_named_like_our_internals_is_just_an_argumentpassed
A model chosen argument named like our internals is just an argument (no description in the source; shown from the name)
test_net.py — 22 tests 23 passed, 0 failed, 0 skipped
Tests for ragleap_integrations._net - URL validation, the public-address check, and https_post() against a real local TLS server with a throwaway certificate (so hostname verification, IP pinning and the wall-clock deadline are exercised for real, not mocked). DNS and the TCP connect are injected so no test needs the network or a public address.
test_validate_url_okpassed
Validate url ok (no description in the source; shown from the name)test_validate_url_rejectspassed
Validate url rejects (no description in the source; shown from the name)test_transport_error_message_comes_from_constant_tablepassed
Transport error message comes from constant table (no description in the source; shown from the name)test_resolve_public_returns_first_public_ippassed
Resolve public returns first public ip (no description in the source; shown from the name)test_resolve_public_refuses_non_publicpassed
Resolve public refuses non public (no description in the source; shown from the name)test_resolve_public_refuses_when_any_address_is_privatepassed
Resolve public refuses when any address is private (no description in the source; shown from the name)test_resolve_public_accepts_ipv4_mapped_publicpassed
Resolve public accepts ipv4 mapped public (no description in the source; shown from the name)test_resolve_public_dns_failure_and_empty_answerpassed
Resolve public dns failure and empty answer (no description in the source; shown from the name)test_post_roundtrip_pins_ip_and_sends_expected_requestpassed
Post roundtrip pins ip and sends expected request (no description in the source; shown from the name)test_explicit_port_is_used_for_connect_and_host_headerpassed
Explicit port is used for connect and host header (no description in the source; shown from the name)test_non_public_address_is_refused_before_any_connectpassed
Non public address is refused before any connect (no description in the source; shown from the name)test_hostname_mismatch_fails_tls_verificationpassed
Hostname mismatch fails tls verification (no description in the source; shown from the name)test_redirect_is_returned_not_followedpassed
Redirect is returned not followed (no description in the source; shown from the name)test_error_status_body_is_returnedpassed
Error status body is returned (no description in the source; shown from the name)test_response_larger_than_cap_is_refusedpassed
Response larger than cap is refused (no description in the source; shown from the name)test_truncated_body_is_an_error_not_a_short_successpassed
Truncated body is an error not a short success (no description in the source; shown from the name)test_chunked_response_is_decodedpassed
Chunked response is decoded (no description in the source; shown from the name)test_event_stream_stops_early_when_the_caller_says_sopassed
Event stream stops early when the caller says so (no description in the source; shown from the name)test_slow_drip_body_hits_the_deadline_not_the_per_operation_timeoutpassed
One byte every 0.1 s never trips the 5 s per-operation timeout; onlytest_slow_drip_headers_hit_the_deadlinepassed
Slow drip headers hit the deadline (no description in the source; shown from the name)test_stalled_tls_handshake_hits_the_deadlinepassed
Stalled tls handshake hits the deadline (no description in the source; shown from the name)test_connect_failure_is_a_constant_errorpassed
Connect failure is a constant error (no description in the source; shown from the name)