RagLeap
Tests

Tests: ragleap-integrations

Test files: 9. Test functions: 303. 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 626 passed, 0 skipped, 0 failed CI job ragleap-integrations-tests (3.11) passed 626 passed, 0 skipped, 0 failed CI job ragleap-integrations-tests (3.12) passed 626 passed, 0 skipped, 0 failed CI job

test_connect.py — 18 tests 18 passed, 0 failed, 0 skipped

connect(): one call from a URL to tools, a Toolkit and a readable report.

  • test_connect_returns_ready_tools_and_a_toolkit passed
    Connect returns ready tools and a toolkit (no description in the source; shown from the name)
  • test_the_toolkit_dispatches_a_model_call_to_the_server passed
    The toolkit dispatches a model call to the server (no description in the source; shown from the name)
  • test_the_toolkit_rejects_arguments_that_break_the_servers_schema_before_any_call passed
    The toolkit rejects arguments that break the servers schema before any call (no description in the source; shown from the name)
  • test_name_prefixes_the_tool_names passed
    Name prefixes the tool names (no description in the source; shown from the name)
  • test_report_lists_ready_and_skipped_tools_with_hints passed
    Report lists ready and skipped tools with hints (no description in the source; shown from the name)
  • test_report_says_when_approval_is_not_required passed
    Report says when approval is not required (no description in the source; shown from the name)
  • test_approve_and_pre_approved_build_the_policy passed
    Approve and pre approved build the policy (no description in the source; shown from the name)
  • test_on_event_is_wired_through passed
    On event is wired through (no description in the source; shown from the name)
  • test_allow_must_be_a_non_empty_list_of_names passed
    Allow must be a non empty list of names (no description in the source; shown from the name)
  • test_pre_approved_must_be_a_list_of_names_inside_allow passed
    Pre approved must be a list of names inside allow (no description in the source; shown from the name)
  • test_bad_urls_and_names_fail_at_configuration_time passed
    Bad urls and names fail at configuration time (no description in the source; shown from the name)
  • test_limits_are_passed_through_and_unknown_limits_fail passed
    Limits are passed through and unknown limits fail (no description in the source; shown from the name)
  • test_a_failed_discovery_raises passed
    A failed discovery raises (no description in the source; shown from the name)
  • test_connect_config_with_owner_supplied_specs_makes_no_request passed
    Connect config with owner supplied specs makes no request (no description in the source; shown from the name)
  • test_connect_config_handles_several_servers passed
    Connect config handles several servers (no description in the source; shown from the name)
  • test_the_token_is_sent_and_never_appears_in_the_report passed
    The token is sent and never appears in the report (no description in the source; shown from the name)
  • test_pre_approved_alone_builds_a_policy_without_an_approve_hook passed
    Pre approved alone builds a policy without an approve hook (no description in the source; shown from the name)
  • test_a_tool_without_governance_metadata_is_reported_as_needing_approval passed
    A tool without governance metadata is reported as needing approval (no description in the source; shown from the name)
test_governance.py — 35 tests 35 passed, 0 failed, 0 skipped

Governance: server hints are untrusted, approval flags, the approve hook and the audit events.

  • test_only_the_four_boolean_hints_survive passed
    Only the four boolean hints survive (no description in the source; shown from the name)
  • test_non_dict_or_empty_annotations_give_no_hints passed
    Non dict or empty annotations give no hints (no description in the source; shown from the name)
  • test_hint_keys_are_the_four_spec_names passed
    Hint keys are the four spec names (no description in the source; shown from the name)
  • test_everything_requires_approval_by_default passed
    Everything requires approval by default (no description in the source; shown from the name)
  • test_a_read_only_hint_relaxes_only_under_owner_trust passed
    A read only hint relaxes only under owner trust (no description in the source; shown from the name)
  • test_a_contradictory_server_claim_keeps_approval_required passed
    A contradictory server claim keeps approval required (no description in the source; shown from the name)
  • test_pre_approved_wins_even_over_destructive_hints passed
    Pre approved wins even over destructive hints (no description in the source; shown from the name)
  • test_policy_rejects_bad_fields_and_dedupes passed
    Policy rejects bad fields and dedupes (no description in the source; shown from the name)
  • test_config_validates_policy_hook_and_trust_flag passed
    Config validates policy hook and trust flag (no description in the source; shown from the name)
  • test_old_positional_construction_still_works passed
    Old positional construction still works (no description in the source; shown from the name)
  • test_owner_supplied_spec_annotations_are_validated passed
    Owner supplied spec annotations are validated (no description in the source; shown from the name)
  • test_discovery_keeps_only_sanitized_hints passed
    Discovery keeps only sanitized hints (no description in the source; shown from the name)
  • test_tool_metadata_describes_the_flag_and_hints passed
    Tool metadata describes the flag and hints (no description in the source; shown from the name)
  • test_metadata_annotations_are_a_copy passed
    Metadata annotations are a copy (no description in the source; shown from the name)
  • test_without_trust_nothing_is_relaxed_even_for_read_only_tools passed
    Without trust nothing is relaxed even for read only tools (no description in the source; shown from the name)
  • test_without_an_approve_hook_the_flag_is_advice_only passed
    Without an approve hook the flag is advice only (no description in the source; shown from the name)
  • test_an_approved_call_reaches_the_server passed
    An approved call reaches the server (no description in the source; shown from the name)
  • test_anything_but_exactly_true_denies_and_the_server_is_never_called passed
    Anything but exactly true denies and the server is never called (no description in the source; shown from the name)
  • test_a_raising_hook_denies_and_is_logged passed
    A raising hook denies and is logged (no description in the source; shown from the name)
  • test_the_hook_gets_a_copy_so_it_cannot_change_what_is_sent passed
    The hook gets a copy so it cannot change what is sent (no description in the source; shown from the name)
  • test_the_hook_is_not_consulted_when_approval_is_not_required passed
    The hook is not consulted when approval is not required (no description in the source; shown from the name)
  • test_pre_approved_tools_skip_the_hook passed
    Pre approved tools skip the hook (no description in the source; shown from the name)
  • test_the_hook_runs_only_after_the_arguments_are_valid passed
    The hook runs only after the arguments are valid (no description in the source; shown from the name)
  • test_a_direct_call_with_no_flag_is_treated_as_needing_approval passed
    A direct call with no flag is treated as needing approval (no description in the source; shown from the name)
  • test_discover_emits_one_event_with_counts_only passed
    Discover emits one event with counts only (no description in the source; shown from the name)
  • test_a_failed_discovery_emits_an_event_and_still_raises passed
    A failed discovery emits an event and still raises (no description in the source; shown from the name)
  • test_a_call_event_has_no_arguments_and_no_result_text passed
    A call event has no arguments and no result text (no description in the source; shown from the name)
  • test_a_denied_call_event passed
    A denied call event (no description in the source; shown from the name)
  • test_a_tool_reported_error_never_puts_the_tool_text_in_the_event passed
    A tool reported error never puts the tool text in the event (no description in the source; shown from the name)
  • test_a_transport_failure_event_carries_the_constant_message passed
    A transport failure event carries the constant message (no description in the source; shown from the name)
  • test_a_failing_event_hook_never_breaks_a_call passed
    A failing event hook never breaks a call (no description in the source; shown from the name)
  • test_the_hook_receives_a_copy_of_the_event passed
    The hook receives a copy of the event (no description in the source; shown from the name)
  • test_unchecked_approval_when_the_call_fails_before_the_check passed
    Unchecked approval when the call fails before the check (no description in the source; shown from the name)
  • test_a_policy_without_an_approve_hook_enforces_nothing passed
    A policy without an approve hook enforces nothing (no description in the source; shown from the name)
  • test_no_hook_means_no_logging_noise passed
    No hook means no logging noise (no description in the source; shown from the name)
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)
test_net_methods.py — 12 tests 12 passed, 0 failed, 0 skipped

https_request(): GET, PUT, PATCH and DELETE (new in 0.4.0) against a real local TLS server with a throwaway certificate, using the helpers of test_net.py. The properties that matter are the same as for POST: IP pinning, verified TLS, no redirects, a size cap and constant errors - plus the new ones: only five methods, and what each one puts on the wire.

  • test_the_allowed_methods_are_exactly_the_five_utcp_uses passed
    The allowed methods are exactly the five utcp uses (no description in the source; shown from the name)
  • test_get_and_delete_send_no_body_and_no_content_length passed
    Get and delete send no body and no content length (no description in the source; shown from the name)
  • test_post_put_and_patch_send_the_body_with_its_exact_length passed
    Post put and patch send the body with its exact length (no description in the source; shown from the name)
  • test_a_body_less_post_put_or_patch_says_content_length_zero passed
    A body less post put or patch says content length zero (no description in the source; shown from the name)
  • test_any_other_method_is_refused_before_dns_or_connect passed
    Any other method is refused before dns or connect (no description in the source; shown from the name)
  • test_the_method_is_checked_before_the_url_so_a_bad_pair_reports_the_method passed
    The method is checked before the url so a bad pair reports the method (no description in the source; shown from the name)
  • test_a_redirect_is_returned_never_followed_for_every_method passed
    A redirect is returned never followed for every method (no description in the source; shown from the name)
  • test_the_size_cap_and_the_error_status_apply_to_a_get passed
    The size cap and the error status apply to a get (no description in the source; shown from the name)
  • test_a_non_public_address_is_refused_for_a_get_before_any_connect passed
    A non public address is refused for a get before any connect (no description in the source; shown from the name)
  • test_hostname_mismatch_still_fails_for_a_get passed
    Hostname mismatch still fails for a get (no description in the source; shown from the name)
  • test_https_post_is_a_post_through_https_request_with_the_same_options passed
    Https post is a post through https request with the same options (no description in the source; shown from the name)
  • test_default_headers_cannot_be_dropped_by_the_caller_but_can_be_added passed
    Default headers cannot be dropped by the caller but can be added (no description in the source; shown from the name)
test_response_cap.py — 7 tests 7 passed, 0 failed, 0 skipped

v0.1.1: the default response-size cap is 1 MiB and the too-large error names the setting.

  • test_default_response_cap_is_one_mib passed
    Default response cap is one mib (no description in the source; shown from the name)
  • test_a_reply_the_size_of_the_real_pubsub_tool_list_passes_with_the_default passed
    A reply the size of the real pubsub tool list passes with the default (no description in the source; shown from the name)
  • test_exactly_one_mib_passes_and_one_byte_more_is_refused passed
    Exactly one mib passes and one byte more is refused (no description in the source; shown from the name)
  • test_an_explicit_smaller_cap_still_applies passed
    An explicit smaller cap still applies (no description in the source; shown from the name)
  • test_the_too_large_message_names_the_setting_and_stays_constant passed
    The too large message names the setting and stays constant (no description in the source; shown from the name)
  • test_discovery_error_names_the_setting passed
    Discovery error names the setting (no description in the source; shown from the name)
  • test_a_tool_call_error_names_the_setting passed
    A tool call error names the setting (no description in the source; shown from the name)
test_tenancy.py — 47 tests 47 passed, 0 failed, 0 skipped

Multi-tenant tests: isolation is asserted through the one network seam, never assumed.

  • test_a_scope_is_required passed
    A scope is required (no description in the source; shown from the name)
  • test_a_subclass_of_scope_is_refused passed
    A subclass of scope is refused (no description in the source; shown from the name)
  • test_require_scope_returns_the_scope passed
    Require scope returns the scope (no description in the source; shown from the name)
  • test_the_security_scope_is_the_one_in_use_and_the_fallback_is_refused passed
    The security scope is the one in use and the fallback is refused (no description in the source; shown from the name)
  • test_the_fallback_scope_has_the_same_rules_and_key_format passed
    The fallback scope has the same rules and key format (no description in the source; shown from the name)
  • test_the_fallback_key_equals_the_security_key passed
    The fallback key equals the security key (no description in the source; shown from the name)
  • test_the_hub_works_with_the_fallback_scope_when_it_is_the_scope passed
    The hub works with the fallback scope when it is the scope (no description in the source; shown from the name)
  • test_hub_construction_is_validated passed
    Hub construction is validated (no description in the source; shown from the name)
  • test_ratelimit_is_validated passed
    Ratelimit is validated (no description in the source; shown from the name)
  • test_approve_scoped_must_be_callable passed
    Approve scoped must be callable (no description in the source; shown from the name)
  • test_connect_builds_tools_for_the_scope_and_caches_it passed
    Connect builds tools for the scope and caches it (no description in the source; shown from the name)
  • test_each_scope_has_its_own_client_and_snapshot passed
    Each scope has its own client and snapshot (no description in the source; shown from the name)
  • test_the_owner_config_is_never_changed passed
    The owner config is never changed (no description in the source; shown from the name)
  • test_concurrent_first_connects_for_one_scope_build_once passed
    Concurrent first connects for one scope build once (no description in the source; shown from the name)
  • test_least_recently_used_scope_is_dropped passed
    Least recently used scope is dropped (no description in the source; shown from the name)
  • test_forget_one_scope_or_a_whole_tenant passed
    Forget one scope or a whole tenant (no description in the source; shown from the name)
  • test_a_tenants_token_is_never_sent_for_another_tenant passed
    A tenants token is never sent for another tenant (no description in the source; shown from the name)
  • test_the_provider_is_called_for_every_request_and_nothing_is_cached passed
    The provider is called for every request and nothing is cached (no description in the source; shown from the name)
  • test_no_provider_keeps_the_static_token passed
    No provider keeps the static token (no description in the source; shown from the name)
  • test_a_provider_returning_none_sends_no_token_and_ignores_the_static_one passed
    A provider returning none sends no token and ignores the static one (no description in the source; shown from the name)
  • test_a_wrapped_token_is_revealed_only_for_the_header passed
    A wrapped token is revealed only for the header (no description in the source; shown from the name)
  • test_the_real_wrapper_from_ragleap_security_works passed
    The real wrapper from ragleap security works (no description in the source; shown from the name)
  • test_unusable_tokens_give_the_constant_message_and_nothing_is_sent passed
    Unusable tokens give the constant message and nothing is sent (no description in the source; shown from the name)
  • test_a_failing_provider_gives_the_constant_message_without_its_text passed
    A failing provider gives the constant message without its text (no description in the source; shown from the name)
  • test_a_failing_provider_during_discovery_is_a_constant_discovery_error passed
    A failing provider during discovery is a constant discovery error (no description in the source; shown from the name)
  • test_the_token_never_appears_in_events_audit_results_errors_or_the_report passed
    The token never appears in events audit results errors or the report (no description in the source; shown from the name)
  • test_each_tenant_discovers_with_its_own_token_and_sees_its_own_tools passed
    Each tenant discovers with its own token and sees its own tools (no description in the source; shown from the name)
  • test_allow_for_narrows_and_never_widens passed
    Allow for narrows and never widens (no description in the source; shown from the name)
  • test_allow_for_with_nothing_left_or_a_bad_value_is_a_config_error passed
    Allow for with nothing left or a bad value is a config error (no description in the source; shown from the name)
  • test_a_failing_allow_for_or_policy_for_is_a_constant_config_error passed
    A failing allow for or policy for is a constant config error (no description in the source; shown from the name)
  • test_policy_for_gives_each_tenant_its_own_approval_rule passed
    Policy for gives each tenant its own approval rule (no description in the source; shown from the name)
  • test_policy_for_none_uses_the_owner_policy_and_pre_approved_is_filtered_to_the_tenant passed
    Policy for none uses the owner policy and pre approved is filtered to the tenant (no description in the source; shown from the name)
  • test_policy_for_must_return_a_policy_or_none passed
    Policy for must return a policy or none (no description in the source; shown from the name)
  • test_approve_scoped_receives_the_scope_and_wins_over_approve passed
    Approve scoped receives the scope and wins over approve (no description in the source; shown from the name)
  • test_approve_scoped_denies_on_exception_on_non_true_and_without_a_scope passed
    Approve scoped denies on exception on non true and without a scope (no description in the source; shown from the name)
  • test_the_limit_is_per_tenant_counted_before_the_network_and_slides passed
    The limit is per tenant counted before the network and slides (no description in the source; shown from the name)
  • test_invalid_calls_do_not_use_the_budget passed
    Invalid calls do not use the budget (no description in the source; shown from the name)
  • test_forgetting_a_tenant_resets_its_window passed
    Forgetting a tenant resets its window (no description in the source; shown from the name)
  • test_a_failing_guard_denies_the_call passed
    A failing guard denies the call (no description in the source; shown from the name)
  • test_events_carry_the_scope_and_never_arguments_or_results passed
    Events carry the scope and never arguments or results (no description in the source; shown from the name)
  • test_a_client_without_a_scope_has_no_tenant_fields passed
    A client without a scope has no tenant fields (no description in the source; shown from the name)
  • test_audit_receives_every_event_with_the_exact_scope passed
    Audit receives every event with the exact scope (no description in the source; shown from the name)
  • test_a_failing_audit_or_owner_hook_never_breaks_a_call_and_the_other_still_runs passed
    A failing audit or owner hook never breaks a call and the other still runs (no description in the source; shown from the name)
  • test_events_land_in_a_real_hash_chained_audit_log passed
    Events land in a real hash chained audit log (no description in the source; shown from the name)
  • test_concurrent_tenants_never_cross_tokens passed
    Concurrent tenants never cross tokens (no description in the source; shown from the name)
  • test_requests_of_one_scope_are_serialized_and_scopes_do_not_share_a_lock passed
    Requests of one scope are serialized and scopes do not share a lock (no description in the source; shown from the name)
  • test_a_plain_client_is_unchanged passed
    A plain client is unchanged (no description in the source; shown from the name)
test_utcp.py — 66 tests 66 passed, 0 failed, 0 skipped

UTCP client: reading a manual, skipping what is not safe, building requests, governance.

  • test_connect_returns_ready_tools_a_toolkit_and_a_report passed
    Connect returns ready tools a toolkit and a report (no description in the source; shown from the name)
  • test_the_manual_is_read_once_with_a_plain_get_and_calls_never_read_it_again passed
    The manual is read once with a plain get and calls never read it again (no description in the source; shown from the name)
  • test_a_manual_that_changes_after_connect_has_no_effect passed
    A manual that changes after connect has no effect (no description in the source; shown from the name)
  • test_only_exactly_allowlisted_tools_are_offered passed
    Only exactly allowlisted tools are offered (no description in the source; shown from the name)
  • test_a_tool_the_manual_does_not_offer_is_skipped_with_a_hint passed
    A tool the manual does not offer is skipped with a hint (no description in the source; shown from the name)
  • test_the_first_tool_with_a_name_wins passed
    The first tool with a name wins (no description in the source; shown from the name)
  • test_a_document_that_is_not_a_utcp_manual_is_refused passed
    A document that is not a utcp manual is refused (no description in the source; shown from the name)
  • test_discovery_failures_have_constant_messages_and_no_server_text passed
    Discovery failures have constant messages and no server text (no description in the source; shown from the name)
  • test_unsafe_or_unsupported_tools_are_skipped_with_a_constant_reason passed
    Unsafe or unsupported tools are skipped with a constant reason (no description in the source; shown from the name)
  • test_a_schema_over_the_limit_is_skipped_and_the_limit_is_adjustable passed
    A schema over the limit is skipped and the limit is adjustable (no description in the source; shown from the name)
  • test_the_description_is_capped_and_a_missing_one_is_empty passed
    The description is capped and a missing one is empty (no description in the source; shown from the name)
  • test_a_missing_inputs_key_means_no_arguments passed
    A missing inputs key means no arguments (no description in the source; shown from the name)
  • test_extra_origins_are_approved_only_when_the_owner_lists_them passed
    Extra origins are approved only when the owner lists them (no description in the source; shown from the name)
  • test_an_origin_includes_its_port_and_is_case_insensitive passed
    An origin includes its port and is case insensitive (no description in the source; shown from the name)
  • test_bad_origins_are_refused_at_setup passed
    Bad origins are refused at setup (no description in the source; shown from the name)
  • test_origins_must_be_a_list passed
    Origins must be a list (no description in the source; shown from the name)
  • test_the_call_time_origin_check_holds_even_if_a_spec_is_tampered_with passed
    The call time origin check holds even if a spec is tampered with (no description in the source; shown from the name)
  • test_a_path_argument_is_url_encoded_and_cannot_change_the_path passed
    A path argument is url encoded and cannot change the path (no description in the source; shown from the name)
  • test_a_missing_or_unsafe_path_argument_sends_nothing passed
    A missing or unsafe path argument sends nothing (no description in the source; shown from the name)
  • test_numbers_and_booleans_are_accepted_in_the_path_and_the_query passed
    Numbers and booleans are accepted in the path and the query (no description in the source; shown from the name)
  • test_remaining_arguments_go_in_the_query_encoded_and_none_is_left_out passed
    Remaining arguments go in the query encoded and none is left out (no description in the source; shown from the name)
  • test_non_scalar_query_values_and_bad_keys_send_nothing passed
    Non scalar query values and bad keys send nothing (no description in the source; shown from the name)
  • test_a_url_that_grows_beyond_the_limit_sends_nothing passed
    A url that grows beyond the limit sends nothing (no description in the source; shown from the name)
  • test_body_field_becomes_a_json_body_and_the_rest_the_query passed
    Body field becomes a json body and the rest the query (no description in the source; shown from the name)
  • test_every_supported_method_is_used_as_declared passed
    Every supported method is used as declared (no description in the source; shown from the name)
  • test_a_missing_body_value_sends_no_body_and_no_content_type passed
    A missing body value sends no body and no content type (no description in the source; shown from the name)
  • test_the_owner_token_goes_to_approved_origins_only_as_a_bearer_header passed
    The owner token goes to approved origins only as a bearer header (no description in the source; shown from the name)
  • test_without_a_token_no_authorization_header_is_sent passed
    Without a token no authorization header is sent (no description in the source; shown from the name)
  • test_static_headers_from_the_manual_are_forwarded_and_the_owner_token_wins passed
    Static headers from the manual are forwarded and the owner token wins (no description in the source; shown from the name)
  • test_a_model_argument_can_never_become_a_header_or_override_a_parameter_of_ours passed
    A model argument can never become a header or override a parameter of ours (no description in the source; shown from the name)
  • test_a_success_returns_the_body_text_capped passed
    A success returns the body text capped (no description in the source; shown from the name)
  • test_invalid_utf8_in_a_reply_is_replaced_not_raised passed
    Invalid utf8 in a reply is replaced not raised (no description in the source; shown from the name)
  • test_any_2xx_is_a_success passed
    Any 2xx is a success (no description in the source; shown from the name)
  • test_other_statuses_are_failures_with_a_constant_message_and_never_the_body passed
    Other statuses are failures with a constant message and never the body (no description in the source; shown from the name)
  • test_transport_errors_and_unexpected_exceptions_never_raise_and_never_leak_text passed
    Transport errors and unexpected exceptions never raise and never leak text (no description in the source; shown from the name)
  • test_calls_outside_the_allowlist_or_with_bad_arguments_send_nothing passed
    Calls outside the allowlist or with bad arguments send nothing (no description in the source; shown from the name)
  • test_a_client_that_never_discovered_offers_nothing passed
    A client that never discovered offers nothing (no description in the source; shown from the name)
  • test_every_tool_requires_approval_unless_the_owner_pre_approved_it passed
    Every tool requires approval unless the owner pre approved it (no description in the source; shown from the name)
  • test_the_approve_hook_must_return_exactly_true_and_a_denial_sends_nothing passed
    The approve hook must return exactly true and a denial sends nothing (no description in the source; shown from the name)
  • test_an_approve_hook_that_raises_denies_and_gets_a_copy_of_the_arguments passed
    An approve hook that raises denies and gets a copy of the arguments (no description in the source; shown from the name)
  • test_pre_approved_tools_skip_the_hook_and_without_a_hook_the_flag_is_advice passed
    Pre approved tools skip the hook and without a hook the flag is advice (no description in the source; shown from the name)
  • test_an_unknown_requires_approval_value_fails_closed passed
    An unknown requires approval value fails closed (no description in the source; shown from the name)
  • test_audit_events_have_the_documented_shape_and_never_carry_arguments_results_or_the_token passed
    Audit events have the documented shape and never carry arguments results or the token (no description in the source; shown from the name)
  • test_a_failed_discovery_and_a_failed_call_are_audited_with_constant_text passed
    A failed discovery and a failed call are audited with constant text (no description in the source; shown from the name)
  • test_a_failing_audit_hook_never_breaks_a_call passed
    A failing audit hook never breaks a call (no description in the source; shown from the name)
  • test_allow_must_be_a_non_empty_list_of_names passed
    Allow must be a non empty list of names (no description in the source; shown from the name)
  • test_bad_server_settings_are_refused passed
    Bad server settings are refused (no description in the source; shown from the name)
  • test_a_manual_url_must_be_https_to_a_public_host passed
    A manual url must be https to a public host (no description in the source; shown from the name)
  • test_bad_limits_and_bad_pre_approved_entries_are_refused passed
    Bad limits and bad pre approved entries are refused (no description in the source; shown from the name)
  • test_the_config_accepts_only_utcp_servers passed
    The config accepts only utcp servers (no description in the source; shown from the name)
  • test_two_tools_that_would_get_the_same_exposed_name_are_refused passed
    Two tools that would get the same exposed name are refused (no description in the source; shown from the name)
  • test_parse_manual_is_a_pure_function_of_its_inputs passed
    Parse manual is a pure function of its inputs (no description in the source; shown from the name)
  • test_connect_works_without_the_security_extra_and_does_not_touch_the_environment passed
    Connect works without the security extra and does not touch the environment (no description in the source; shown from the name)
  • test_too_many_static_headers_or_an_overlong_header_value_skip_the_tool passed
    Too many static headers or an overlong header value skip the tool (no description in the source; shown from the name)
  • test_a_manual_answered_with_anything_but_200_is_refused passed
    A manual answered with anything but 200 is refused (no description in the source; shown from the name)
  • test_a_slash_in_a_query_value_or_key_is_encoded passed
    A slash in a query value or key is encoded (no description in the source; shown from the name)
  • test_the_report_says_when_approval_is_not_required_and_hints_the_origin_setting passed
    The report says when approval is not required and hints the origin setting (no description in the source; shown from the name)
  • test_the_manual_is_read_with_the_owner_timeouts_through_the_default_transport passed
    The manual is read with the owner timeouts through the default transport (no description in the source; shown from the name)
  • test_put_and_patch_carry_a_json_body_through_body_field passed
    Put and patch carry a json body through body field (no description in the source; shown from the name)
  • test_a_missing_or_non_string_url_skips_the_tool_instead_of_crashing_discovery passed
    A missing or non string url skips the tool instead of crashing discovery (no description in the source; shown from the name)
  • test_a_stray_closing_brace_in_the_path_is_malformed passed
    A stray closing brace in the path is malformed (no description in the source; shown from the name)
  • test_the_json_content_type_is_matched_case_insensitively_and_ignores_parameters passed
    The json content type is matched case insensitively and ignores parameters (no description in the source; shown from the name)
  • test_the_allowlist_is_checked_again_at_call_time_even_if_the_snapshot_is_tampered_with passed
    The allowlist is checked again at call time even if the snapshot is tampered with (no description in the source; shown from the name)
  • test_a_body_value_that_is_not_json_is_refused_cleanly_before_any_hook_or_request passed
    A body value that is not json is refused cleanly before any hook or request (no description in the source; shown from the name)
  • test_a_template_with_a_field_this_version_does_not_understand_is_skipped_not_mis_called passed
    A template with a field this version does not understand is skipped not mis called (no description in the source; shown from the name)
  • test_the_documented_template_fields_are_all_accepted passed
    The documented template fields are all accepted (no description in the source; shown from the name)
test_utcp_auth.py — 24 tests 25 passed, 0 failed, 0 skipped

UTCP 0.5.0: the one accepted auth shape and owner-allowed static query parameters.

  • test_the_exact_auth_block_is_accepted_with_a_token passed
    The exact auth block is accepted with a token (no description in the source; shown from the name)
  • test_the_exact_auth_block_without_a_token_is_skipped_with_a_hint passed
    The exact auth block without a token is skipped with a hint (no description in the source; shown from the name)
  • test_near_miss_auth_blocks_keep_the_old_reason passed
    Near miss auth blocks keep the old reason (no description in the source; shown from the name)
  • test_wrong_shaped_auth_keeps_the_old_reason passed
    Wrong shaped auth keeps the old reason (no description in the source; shown from the name)
  • test_auth_tools_is_still_refused_even_with_the_exact_auth passed
    Auth tools is still refused even with the exact auth (no description in the source; shown from the name)
  • test_auth_null_still_means_no_auth passed
    Auth null still means no auth (no description in the source; shown from the name)
  • test_the_placeholder_name_is_never_looked_up passed
    The placeholder name is never looked up (no description in the source; shown from the name)
  • test_an_accepted_auth_does_not_widen_the_approved_origins passed
    An accepted auth does not widen the approved origins (no description in the source; shown from the name)
  • test_by_default_a_query_string_is_refused_as_in_0_4_0 passed
    By default a query string is refused as in 0 4 0 (no description in the source; shown from the name)
  • test_an_allowed_query_name_is_accepted_and_kept_apart_from_the_url passed
    An allowed query name is accepted and kept apart from the url (no description in the source; shown from the name)
  • test_query_refusals passed
    Query refusals (no description in the source; shown from the name)
  • test_too_many_query_fields_are_refused passed
    Too many query fields are refused (no description in the source; shown from the name)
  • test_the_query_hint_is_in_the_report passed
    The query hint is in the report (no description in the source; shown from the name)
  • test_allowed_query_validation passed
    Allowed query validation (no description in the source; shown from the name)
  • test_allowed_query_validation_accepts_edges passed
    Allowed query validation accepts edges (no description in the source; shown from the name)
  • test_connect_utcp_rejects_a_string_allowed_query passed
    Connect utcp rejects a string allowed query (no description in the source; shown from the name)
  • test_static_pairs_come_first_then_the_arguments passed
    Static pairs come first then the arguments (no description in the source; shown from the name)
  • test_a_none_argument_named_like_a_static_parameter_is_ignored passed
    A none argument named like a static parameter is ignored (no description in the source; shown from the name)
  • test_an_argument_named_like_a_static_parameter_is_refused_and_nothing_is_sent passed
    An argument named like a static parameter is refused and nothing is sent (no description in the source; shown from the name)
  • test_real_shape_with_token_and_allowed_query_is_offered_and_called passed
    Real shape with token and allowed query is offered and called (no description in the source; shown from the name)
  • test_real_shape_with_a_token_but_no_allowed_query_is_stopped_by_the_query_rule passed
    Real shape with a token but no allowed query is stopped by the query rule (no description in the source; shown from the name)
  • test_real_shape_with_allowed_query_but_no_token_is_stopped_by_the_no_token_rule passed
    Real shape with allowed query but no token is stopped by the no token rule (no description in the source; shown from the name)
  • test_a_large_schema_is_still_skipped passed
    A large schema is still skipped (no description in the source; shown from the name)
  • test_a_bare_question_mark_is_refused_even_without_allowed_query passed
    A bare question mark is refused even without allowed query (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