Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions tests/test_golden_outputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ def test_check_console_clean_fixture_matches_golden_output(self) -> None:
)

def test_check_console_redacts_secret_like_repository_path(self) -> None:
with tempfile.TemporaryDirectory(prefix="sk-ant-testredaction123456-") as temp_dir:
secret_like_prefix = "sk-ant-" + "testredaction123456"

with tempfile.TemporaryDirectory(prefix=f"{secret_like_prefix}-") as temp_dir:
repository = Path(temp_dir)
(repository / "AGENTS.md").write_text("Scope: test\nNo secrets.\n", encoding="utf-8")

Expand All @@ -61,7 +63,7 @@ def test_check_console_redacts_secret_like_repository_path(self) -> None:
self.assertEqual(result.exit_code, 0)
self.assertEqual(result.stderr, "")
self.assertIn("[REDACTED]", result.stdout)
self.assertNotIn("sk-ant-testredaction123456", result.stdout)
self.assertNotIn(secret_like_prefix, result.stdout)

def test_check_json_clean_fixture_matches_golden_output(self) -> None:
repository = FIXTURE_ROOT / "single-agent"
Expand Down