Skip to content

Commit bd813ea

Browse files
Ilanlidoclaude
andcommitted
CM-61568: Fix test assertion for second event outcome
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 4c92fb4 commit bd813ea

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/cli/commands/ai_guardrails/scan/test_handlers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,13 +286,13 @@ def test_handle_before_read_file_sensitive_path_warn_mode_scans_content(
286286
assert result['permission'] == 'ask'
287287
assert '.env' in result['user_message']
288288

289-
# Two events: sensitive path warn + content scan result (no secrets, but still warned due to path)
289+
# Two events: sensitive path warn + content scan result (allowed, no secrets found)
290290
assert mock_ctx.obj['ai_security_client'].create_event.call_count == 2
291291
first_event = mock_ctx.obj['ai_security_client'].create_event.call_args_list[0]
292292
assert first_event.args[2] == AIHookOutcome.WARNED
293293
assert first_event.kwargs['block_reason'] == BlockReason.SENSITIVE_PATH
294294
second_event = mock_ctx.obj['ai_security_client'].create_event.call_args_list[1]
295-
assert second_event.args[2] == AIHookOutcome.WARNED
295+
assert second_event.args[2] == AIHookOutcome.ALLOWED
296296
assert second_event.kwargs['block_reason'] is None
297297

298298

0 commit comments

Comments
 (0)