Orchestrata Ultimate › Tests › Reference › claude › test_enforcement_hook_coverage

Tests reference — tests/claude/test_enforcement_hook_coverage.py

Module of tests/claude, split out because the directory page would be too large.

Prose pending.

tests/claude/test_enforcement_hook_coverage.py

source · 44 tests · 852 lines

Tests for claude/hooks/enforcement_hook.py.

Kind Name Line Description
function test_mcp_health_healthy_endpoint_returns_true 101
function test_mcp_health_non_200_returns_false 105
function test_mcp_health_unreachable_returns_false 126
function test_load_constraints_missing_file_returns_empty 139
function test_load_constraints_reads_file 143
function test_log_event_writes_json_line 157
function test_replacements_disabled_returns_none 188
function test_replacements_no_matching_tool_returns_none 193
function test_replacements_blocked_pattern_not_matching_returns_none 213
function test_replacements_non_mcp_replacement_returns_rule 234
function test_replacements_mcp_healthy_returns_rule 251
function test_replacements_mcp_down_logs_and_allows 270
function test_prohibited_disabled_returns_none 319
function test_prohibited_bash_command_match 324
function test_prohibited_write_content_match 340
function test_prohibited_edit_new_string_match 355
function test_prohibited_read_file_path_match 363
function test_prohibited_context_mismatch_skipped 380
function test_prohibited_git_commit_context_match 395
function test_prohibited_git_commit_context_without_git_commit_skipped 413
function test_prohibited_context_any_matches 428
function test_workflows_disabled_returns_none 451
function test_workflows_non_bash_returns_none 456
function test_workflows_blocked_pattern_match 461
function test_workflows_no_match_returns_none 484
function test_testing_disabled_returns_none 512
function test_testing_non_write_or_edit_returns_none 517
function test_testing_non_test_file_returns_none 521
function test_testing_blocked_pattern_match 540
function test_testing_rule_without_blocked_patterns_skipped 558
function test_import_disabled_returns_none 577
function test_import_non_write_or_edit_returns_none 585
function test_import_non_python_file_returns_none 591
function test_import_relative_import_match 610
function test_import_no_match_returns_none 628
function test_dev_disabled_returns_none 652
function test_dev_non_bash_returns_none 659
function test_dev_pip_install_match 664
function test_main_invalid_json_approves 700
function test_main_empty_constraints_approves 704
function test_main_critical_violation_blocks 753
function test_main_warn_violation_approves_with_warning 761
function test_main_block_message_names_replacement 769
function test_main_block_message_names_required_command 812