#NEWLINE# def test_fake_git_fake_call( ) : #NEWLINE# #INDENT# git = FakeGit ( 'repo' ) #NEWLINE# git . add_result ( 'fetch' , 0 , '' ) #NEWLINE# ( retcode , _ ) = git . fetch ( raises = False ) #NEWLINE# assert ( retcode == 0 ) #NEWLINE# git2 = FakeGit ( 'repo2' ) #NEWLINE# git2 . add_result ( 'fetch' , 2 , 'Remote end hung up unexpectedly' ) #NEWLINE# ( retcode , out ) = git2 . fetch ( raises = False ) #NEWLINE# assert ( retcode == 2 ) #NEWLINE# assert ( 'Remote end hung up' in git2 )