@@ -238,32 +238,32 @@ async def test_list_refs_no_symref() -> None:
238238
239239
240240async def test_list_refs_empty_response () -> None :
241- """Test that an empty response returns None ."""
241+ """Test that an empty response returns correct string ."""
242242 with patch ("ondiagnostics.tasks.git.git" ) as mock_git :
243243 mock_git .return_value = SubprocessResult ((), 0 , b" " , b"" )
244244
245245 result = await list_refs ("https://github.com/example/repo.git" )
246246
247- assert result is None
247+ assert result == 'repo-empty'
248248
249249
250250async def test_list_refs_repository_not_found () -> None :
251- """Test that a missing repository returns None ."""
251+ """Test that a missing repository returns correct string ."""
252252 with patch ("ondiagnostics.tasks.git.git" ) as mock_git :
253253 mock_git .return_value = SubprocessResult (
254- (), 128 , b"" , b"Repository not found."
254+ (), 128 , b"" , b"fatal: Repository not found."
255255 )
256256
257257 result = await list_refs ("https://github.com/example/missing.git" )
258258
259- assert result is None
259+ assert result == 'repo-not-found'
260260
261261
262262async def test_list_refs_nonzero_exit_code () -> None :
263- """Test that a non-zero exit code returns None ."""
263+ """Test that a non-zero exit code returns correct string ."""
264264 with patch ("ondiagnostics.tasks.git.git" ) as mock_git :
265265 mock_git .return_value = SubprocessResult ((), 1 , b"" , b"some error" )
266266
267267 result = await list_refs ("https://github.com/example/repo.git" )
268268
269- assert result is None
269+ assert result == 'command-failed'
0 commit comments