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_toolkitpassed
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_serverpassed
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_callpassed
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_namespassed
Name prefixes the tool names (no description in the source; shown from the name)test_report_lists_ready_and_skipped_tools_with_hintspassed
Report lists ready and skipped tools with hints (no description in the source; shown from the name)test_report_says_when_approval_is_not_requiredpassed
Report says when approval is not required (no description in the source; shown from the name)test_approve_and_pre_approved_build_the_policypassed
Approve and pre approved build the policy (no description in the source; shown from the name)test_on_event_is_wired_throughpassed
On event is wired through (no description in the source; shown from the name)test_allow_must_be_a_non_empty_list_of_namespassed
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_allowpassed
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_timepassed
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_failpassed
Limits are passed through and unknown limits fail (no description in the source; shown from the name)test_a_failed_discovery_raisespassed
A failed discovery raises (no description in the source; shown from the name)test_connect_config_with_owner_supplied_specs_makes_no_requestpassed
Connect config with owner supplied specs makes no request (no description in the source; shown from the name)test_connect_config_handles_several_serverspassed
Connect config handles several servers (no description in the source; shown from the name)test_the_token_is_sent_and_never_appears_in_the_reportpassed
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_hookpassed
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_approvalpassed
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_survivepassed
Only the four boolean hints survive (no description in the source; shown from the name)test_non_dict_or_empty_annotations_give_no_hintspassed
Non dict or empty annotations give no hints (no description in the source; shown from the name)test_hint_keys_are_the_four_spec_namespassed
Hint keys are the four spec names (no description in the source; shown from the name)test_everything_requires_approval_by_defaultpassed
Everything requires approval by default (no description in the source; shown from the name)test_a_read_only_hint_relaxes_only_under_owner_trustpassed
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_requiredpassed
A contradictory server claim keeps approval required (no description in the source; shown from the name)test_pre_approved_wins_even_over_destructive_hintspassed
Pre approved wins even over destructive hints (no description in the source; shown from the name)test_policy_rejects_bad_fields_and_dedupespassed
Policy rejects bad fields and dedupes (no description in the source; shown from the name)test_config_validates_policy_hook_and_trust_flagpassed
Config validates policy hook and trust flag (no description in the source; shown from the name)test_old_positional_construction_still_workspassed
Old positional construction still works (no description in the source; shown from the name)test_owner_supplied_spec_annotations_are_validatedpassed
Owner supplied spec annotations are validated (no description in the source; shown from the name)test_discovery_keeps_only_sanitized_hintspassed
Discovery keeps only sanitized hints (no description in the source; shown from the name)test_tool_metadata_describes_the_flag_and_hintspassed
Tool metadata describes the flag and hints (no description in the source; shown from the name)test_metadata_annotations_are_a_copypassed
Metadata annotations are a copy (no description in the source; shown from the name)test_without_trust_nothing_is_relaxed_even_for_read_only_toolspassed
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_onlypassed
Without an approve hook the flag is advice only (no description in the source; shown from the name)test_an_approved_call_reaches_the_serverpassed
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_calledpassed
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_loggedpassed
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_sentpassed
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_requiredpassed
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_hookpassed
Pre approved tools skip the hook (no description in the source; shown from the name)test_the_hook_runs_only_after_the_arguments_are_validpassed
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_approvalpassed
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_onlypassed
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_raisespassed
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_textpassed
A call event has no arguments and no result text (no description in the source; shown from the name)test_a_denied_call_eventpassed
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_eventpassed
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_messagepassed
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_callpassed
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_eventpassed
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_checkpassed
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_nothingpassed
A policy without an approve hook enforces nothing (no description in the source; shown from the name)test_no_hook_means_no_logging_noisepassed
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_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)
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_usespassed
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_lengthpassed
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_lengthpassed
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_zeropassed
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_connectpassed
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_methodpassed
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_methodpassed
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_getpassed
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_connectpassed
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_getpassed
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_optionspassed
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_addedpassed
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_mibpassed
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_defaultpassed
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_refusedpassed
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_appliespassed
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_constantpassed
The too large message names the setting and stays constant (no description in the source; shown from the name)test_discovery_error_names_the_settingpassed
Discovery error names the setting (no description in the source; shown from the name)test_a_tool_call_error_names_the_settingpassed
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_requiredpassed
A scope is required (no description in the source; shown from the name)test_a_subclass_of_scope_is_refusedpassed
A subclass of scope is refused (no description in the source; shown from the name)test_require_scope_returns_the_scopepassed
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_refusedpassed
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_formatpassed
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_keypassed
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_scopepassed
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_validatedpassed
Hub construction is validated (no description in the source; shown from the name)test_ratelimit_is_validatedpassed
Ratelimit is validated (no description in the source; shown from the name)test_approve_scoped_must_be_callablepassed
Approve scoped must be callable (no description in the source; shown from the name)test_connect_builds_tools_for_the_scope_and_caches_itpassed
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_snapshotpassed
Each scope has its own client and snapshot (no description in the source; shown from the name)test_the_owner_config_is_never_changedpassed
The owner config is never changed (no description in the source; shown from the name)test_concurrent_first_connects_for_one_scope_build_oncepassed
Concurrent first connects for one scope build once (no description in the source; shown from the name)test_least_recently_used_scope_is_droppedpassed
Least recently used scope is dropped (no description in the source; shown from the name)test_forget_one_scope_or_a_whole_tenantpassed
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_tenantpassed
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_cachedpassed
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_tokenpassed
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_onepassed
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_headerpassed
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_workspassed
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_sentpassed
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_textpassed
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_errorpassed
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_reportpassed
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_toolspassed
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_widenspassed
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_errorpassed
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_errorpassed
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_rulepassed
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_tenantpassed
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_nonepassed
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_approvepassed
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_scopepassed
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_slidespassed
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_budgetpassed
Invalid calls do not use the budget (no description in the source; shown from the name)test_forgetting_a_tenant_resets_its_windowpassed
Forgetting a tenant resets its window (no description in the source; shown from the name)test_a_failing_guard_denies_the_callpassed
A failing guard denies the call (no description in the source; shown from the name)test_events_carry_the_scope_and_never_arguments_or_resultspassed
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_fieldspassed
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_scopepassed
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_runspassed
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_logpassed
Events land in a real hash chained audit log (no description in the source; shown from the name)test_concurrent_tenants_never_cross_tokenspassed
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_lockpassed
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_unchangedpassed
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_reportpassed
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_againpassed
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_effectpassed
A manual that changes after connect has no effect (no description in the source; shown from the name)test_only_exactly_allowlisted_tools_are_offeredpassed
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_hintpassed
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_winspassed
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_refusedpassed
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_textpassed
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_reasonpassed
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_adjustablepassed
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_emptypassed
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_argumentspassed
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_thempassed
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_insensitivepassed
An origin includes its port and is case insensitive (no description in the source; shown from the name)test_bad_origins_are_refused_at_setuppassed
Bad origins are refused at setup (no description in the source; shown from the name)test_origins_must_be_a_listpassed
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_withpassed
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_pathpassed
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_nothingpassed
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_querypassed
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_outpassed
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_nothingpassed
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_nothingpassed
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_querypassed
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_declaredpassed
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_typepassed
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_headerpassed
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_sentpassed
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_winspassed
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_ourspassed
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_cappedpassed
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_raisedpassed
Invalid utf8 in a reply is replaced not raised (no description in the source; shown from the name)test_any_2xx_is_a_successpassed
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_bodypassed
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_textpassed
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_nothingpassed
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_nothingpassed
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_itpassed
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_nothingpassed
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_argumentspassed
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_advicepassed
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_closedpassed
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_tokenpassed
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_textpassed
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_callpassed
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_namespassed
Allow must be a non empty list of names (no description in the source; shown from the name)test_bad_server_settings_are_refusedpassed
Bad server settings are refused (no description in the source; shown from the name)test_a_manual_url_must_be_https_to_a_public_hostpassed
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_refusedpassed
Bad limits and bad pre approved entries are refused (no description in the source; shown from the name)test_the_config_accepts_only_utcp_serverspassed
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_refusedpassed
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_inputspassed
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_environmentpassed
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_toolpassed
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_refusedpassed
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_encodedpassed
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_settingpassed
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_transportpassed
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_fieldpassed
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_discoverypassed
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_malformedpassed
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_parameterspassed
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_withpassed
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_requestpassed
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_calledpassed
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_acceptedpassed
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_tokenpassed
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_hintpassed
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_reasonpassed
Near miss auth blocks keep the old reason (no description in the source; shown from the name)test_wrong_shaped_auth_keeps_the_old_reasonpassed
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_authpassed
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_authpassed
Auth null still means no auth (no description in the source; shown from the name)test_the_placeholder_name_is_never_looked_uppassed
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_originspassed
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_0passed
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_urlpassed
An allowed query name is accepted and kept apart from the url (no description in the source; shown from the name)test_query_refusalspassed
Query refusals (no description in the source; shown from the name)test_too_many_query_fields_are_refusedpassed
Too many query fields are refused (no description in the source; shown from the name)test_the_query_hint_is_in_the_reportpassed
The query hint is in the report (no description in the source; shown from the name)test_allowed_query_validationpassed
Allowed query validation (no description in the source; shown from the name)test_allowed_query_validation_accepts_edgespassed
Allowed query validation accepts edges (no description in the source; shown from the name)test_connect_utcp_rejects_a_string_allowed_querypassed
Connect utcp rejects a string allowed query (no description in the source; shown from the name)test_static_pairs_come_first_then_the_argumentspassed
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_ignoredpassed
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_sentpassed
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_calledpassed
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_rulepassed
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_rulepassed
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_skippedpassed
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_querypassed
A bare question mark is refused even without allowed query (no description in the source; shown from the name)