test: update test_ensure_token_dir for 0o700 mode

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Alex Chen 2026-10-21 14:55:26 -07:00
parent a1180bf0c0
commit 742ae02d28

View file

@ -56,7 +56,8 @@ class TestGitHubCopilotAuthenticator:
patch("os.makedirs") as mock_makedirs,
):
auth = Authenticator()
mock_makedirs.assert_called_once_with(auth.token_dir, exist_ok=True)
# credentials dir must not be group/world-accessible
mock_makedirs.assert_called_once_with(auth.token_dir, mode=0o700, exist_ok=True)
def test_get_github_headers(self, authenticator):
"""Test that GitHub headers are correctly generated."""