@@ -185,8 +185,10 @@ async def test_check_repo_exists_with_pat() -> None:
185185
186186 # Verify curl command includes authorization header
187187 mock_exec .assert_called_with (
188- "curl" , "-I" ,
189- "-H" , f"Authorization: token { pat } " ,
188+ "curl" ,
189+ "-I" ,
190+ "-H" ,
191+ f"Authorization: token { pat } " ,
190192 url ,
191193 stdout = - 1 , # asyncio.subprocess.PIPE
192194 stderr = - 1 , # asyncio.subprocess.PIPE
@@ -208,8 +210,10 @@ async def test_check_repo_exists_custom_git_server() -> None:
208210
209211 # Verify curl command uses correct API endpoint and includes authorization header
210212 mock_exec .assert_called_with (
211- "curl" , "-I" ,
212- "-H" , f"Authorization: token { pat } " ,
213+ "curl" ,
214+ "-I" ,
215+ "-H" ,
216+ f"Authorization: token { pat } " ,
213217 "https://git.custom.com/api/v1/repos/user/repo" ,
214218 stdout = - 1 , # asyncio.subprocess.PIPE
215219 stderr = - 1 , # asyncio.subprocess.PIPE
@@ -223,11 +227,11 @@ async def test_clone_repo_with_pat() -> None:
223227 local_path = "/tmp/repo" ,
224228 commit = None ,
225229 branch = "main" ,
226- pat = "test_token_123"
230+ pat = "test_token_123" ,
227231 )
228232
229- with patch ("gitingest.clone.check_repo_exists " , return_value = True ) as mock_check :
230- with patch ("gitingest.clone.run_git_command " , new_callable = AsyncMock ) as mock_exec :
233+ with patch ("gitingest.clone._check_repo_exists " , return_value = True ) as mock_check :
234+ with patch ("gitingest.clone._run_git_command " , new_callable = AsyncMock ) as mock_exec :
231235 mock_process = AsyncMock ()
232236 mock_process .communicate .return_value = (b"output" , b"error" )
233237 mock_exec .return_value = mock_process
@@ -239,6 +243,5 @@ async def test_clone_repo_with_pat() -> None:
239243 expected_url = clone_config .url .replace ("https://" , f"https://oauth2:{ clone_config .pat } @" )
240244 # Check that the command was called with the correct arguments
241245 mock_exec .assert_called_with (
242- "git" , "clone" , "--depth=1" , "--single-branch" ,
243- expected_url , clone_config .local_path
246+ "git" , "clone" , "--depth=1" , "--single-branch" , expected_url , clone_config .local_path
244247 )
0 commit comments