RagLeap
Tests

Tests: ragleap-integrations

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_order passed
    Valid config dedupes allowlist keeping order (no description in the source; shown from the name)
  • test_bad_server_names_rejected passed
    Bad server names rejected (no description in the source; shown from the name)
  • test_bad_server_urls_rejected passed
    Bad server urls rejected (no description in the source; shown from the name)
  • test_bad_tokens_rejected passed
    Bad tokens rejected (no description in the source; shown from the name)
  • test_duplicate_server_names_and_empty_lists_rejected passed
    Duplicate server names and empty lists rejected (no description in the source; shown from the name)
  • test_bad_allowlist_entries_rejected passed
    Bad allowlist entries rejected (no description in the source; shown from the name)
  • test_bad_limits_rejected passed
    Bad limits rejected (no description in the source; shown from the name)
  • test_plain_values_are_not_encoded passed
    Plain values are not encoded (no description in the source; shown from the name)
  • test_unsafe_values_use_the_base64_sentinel passed
    Unsafe values use the base64 sentinel (no description in the source; shown from the name)
  • test_sentinel_wire_format passed
    Sentinel wire format (no description in the source; shown from the name)
  • test_header_params_found_in_order_including_nested passed
    Header params found in order including nested (no description in the source; shown from the name)
  • test_schema_without_annotations_has_none passed
    Schema without annotations has none (no description in the source; shown from the name)
  • test_invalid_annotations_reject_the_whole_schema passed
    Invalid annotations reject the whole schema (no description in the source; shown from the name)
  • test_annotation_on_the_root_schema_is_rejected passed
    Annotation on the root schema is rejected (no description in the source; shown from the name)
  • test_header_values_extraction passed
    Header values extraction (no description in the source; shown from the name)
  • test_header_values_reject_unmirrorable_values passed
    Header values reject unmirrorable values (no description in the source; shown from the name)
  • test_modern_call_sends_the_exact_request passed
    Modern call sends the exact request (no description in the source; shown from the name)
  • test_no_authorization_header_without_a_token passed
    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_base64 passed
    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_headers passed
    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_needed passed
    Header mirroring uses the base64 form when needed (no description in the source; shown from the name)
  • test_no_arguments_means_an_empty_object passed
    No arguments means an empty object (no description in the source; shown from the name)
  • test_text_parts_are_joined_and_non_text_is_noted passed
    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_marker passed
    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_text passed
    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_fails passed
    Is error without text still fails (no description in the source; shown from the name)
  • test_content_must_be_a_list passed
    Content must be a list (no description in the source; shown from the name)
  • test_input_required_result_is_reported_as_unsupported passed
    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_result passed
    Event stream response with a notification before the result (no description in the source; shown from the name)
  • test_event_stream_with_crlf_line_endings passed
    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_eof passed
    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_failures passed
    Unusable responses become constant failures (no description in the source; shown from the name)
  • test_event_stream_response_ids_must_match passed
    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_text passed
    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_body passed
    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_request passed
    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_request passed
    Unknown server is refused without a request (no description in the source; shown from the name)
  • test_bad_arguments_are_refused_without_a_request passed
    Bad arguments are refused without a request (no description in the source; shown from the name)
  • test_unmirrorable_header_argument_is_refused_without_a_request passed
    Unmirrorable header argument is refused without a request (no description in the source; shown from the name)
  • test_transport_errors_become_constant_results passed
    Transport errors become constant results (no description in the source; shown from the name)
  • test_unexpected_exceptions_never_escape_or_leak passed
    Unexpected exceptions never escape or leak (no description in the source; shown from the name)
  • test_default_transport_passes_the_configured_limits passed
    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_body passed
    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_version passed
    Legacy requests carry the session and negotiated version (no description in the source; shown from the name)
  • test_legacy_without_a_session_header_still_works passed
    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_legacy passed
    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_server passed
    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_error passed
    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_legacy passed
    What a live DeepWiki server answered to the modern request: a 400 with
  • test_a_400_with_any_non_modern_code_falls_back passed
    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_downgraded passed
    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_downgraded passed
    Some servers answer invalid params with 400 and -32602, which the spec
  • test_unsupported_version_code_without_a_usable_list_is_an_error passed
    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_back passed
    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_handshake passed
    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_refused passed
    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_failure passed
    Legacy initialize error and notification failure (no description in the source; shown from the name)
  • test_era_is_remembered_after_a_success passed
    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_legacy passed
    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_filtering passed
    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_found passed
    Discovery follows next cursor and stops when everything is found (no description in the source; shown from the name)
  • test_discovery_page_loop_is_bounded passed
    Discovery page loop is bounded (no description in the source; shown from the name)
  • test_discovery_skips_unusable_tools_with_reasons passed
    Discovery skips unusable tools with reasons (no description in the source; shown from the name)
  • test_discovery_caps_descriptions_and_defaults_missing_schemas passed
    Discovery caps descriptions and defaults missing schemas (no description in the source; shown from the name)
  • test_discovery_failure_raises_a_constant_message passed
    Discovery failure raises a constant message (no description in the source; shown from the name)
  • test_discovery_with_a_malformed_tool_list_fails_cleanly passed
    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_snapshot passed
    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_setup passed
    Owner supplied specs use no network at setup (no description in the source; shown from the name)
  • test_bad_owner_specs_are_configuration_errors passed
    Bad owner specs are configuration errors (no description in the source; shown from the name)
  • test_exposed_names_are_sanitized_truncated_and_collisions_are_errors passed
    Exposed names are sanitized truncated and collisions are errors (no description in the source; shown from the name)
  • test_tool_handlers_never_raise passed
    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_argument passed
    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_ok passed
    Validate url ok (no description in the source; shown from the name)
  • test_validate_url_rejects passed
    Validate url rejects (no description in the source; shown from the name)
  • test_transport_error_message_comes_from_constant_table passed
    Transport error message comes from constant table (no description in the source; shown from the name)
  • test_resolve_public_returns_first_public_ip passed
    Resolve public returns first public ip (no description in the source; shown from the name)
  • test_resolve_public_refuses_non_public passed
    Resolve public refuses non public (no description in the source; shown from the name)
  • test_resolve_public_refuses_when_any_address_is_private passed
    Resolve public refuses when any address is private (no description in the source; shown from the name)
  • test_resolve_public_accepts_ipv4_mapped_public passed
    Resolve public accepts ipv4 mapped public (no description in the source; shown from the name)
  • test_resolve_public_dns_failure_and_empty_answer passed
    Resolve public dns failure and empty answer (no description in the source; shown from the name)
  • test_post_roundtrip_pins_ip_and_sends_expected_request passed
    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_header passed
    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_connect passed
    Non public address is refused before any connect (no description in the source; shown from the name)
  • test_hostname_mismatch_fails_tls_verification passed
    Hostname mismatch fails tls verification (no description in the source; shown from the name)
  • test_redirect_is_returned_not_followed passed
    Redirect is returned not followed (no description in the source; shown from the name)
  • test_error_status_body_is_returned passed
    Error status body is returned (no description in the source; shown from the name)
  • test_response_larger_than_cap_is_refused passed
    Response larger than cap is refused (no description in the source; shown from the name)
  • test_truncated_body_is_an_error_not_a_short_success passed
    Truncated body is an error not a short success (no description in the source; shown from the name)
  • test_chunked_response_is_decoded passed
    Chunked response is decoded (no description in the source; shown from the name)
  • test_event_stream_stops_early_when_the_caller_says_so passed
    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_timeout passed
    One byte every 0.1 s never trips the 5 s per-operation timeout; only
  • test_slow_drip_headers_hit_the_deadline passed
    Slow drip headers hit the deadline (no description in the source; shown from the name)
  • test_stalled_tls_handshake_hits_the_deadline passed
    Stalled tls handshake hits the deadline (no description in the source; shown from the name)
  • test_connect_failure_is_a_constant_error passed
    Connect failure is a constant error (no description in the source; shown from the name)

Compiled by script from the public repository, its CI logs and the GitHub API. To correct something, open an issue.

All tests