File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -52,7 +52,9 @@ def test_check_console_clean_fixture_matches_golden_output(self) -> None:
5252 )
5353
5454 def test_check_console_redacts_secret_like_repository_path (self ) -> None :
55- with tempfile .TemporaryDirectory (prefix = "sk-ant-testredaction123456-" ) as temp_dir :
55+ secret_like_prefix = "sk-ant-" + "testredaction123456"
56+
57+ with tempfile .TemporaryDirectory (prefix = f"{ secret_like_prefix } -" ) as temp_dir :
5658 repository = Path (temp_dir )
5759 (repository / "AGENTS.md" ).write_text ("Scope: test\n No secrets.\n " , encoding = "utf-8" )
5860
@@ -61,7 +63,7 @@ def test_check_console_redacts_secret_like_repository_path(self) -> None:
6163 self .assertEqual (result .exit_code , 0 )
6264 self .assertEqual (result .stderr , "" )
6365 self .assertIn ("[REDACTED]" , result .stdout )
64- self .assertNotIn ("sk-ant-testredaction123456" , result .stdout )
66+ self .assertNotIn (secret_like_prefix , result .stdout )
6567
6668 def test_check_json_clean_fixture_matches_golden_output (self ) -> None :
6769 repository = FIXTURE_ROOT / "single-agent"
You can’t perform that action at this time.
0 commit comments