@@ -21,14 +21,14 @@ def test_subprocess_get(git_helper, mocker):
2121 run = mocker .patch (
2222 "subprocess.run" ,
2323 return_value = mocker .Mock (
24- stdout = os . linesep .join (
24+ stdout = " \n " .join (
2525 ["protocol=https" , "host=foo.com" , "username=foo" , "password=bar" , "" ]
2626 )
2727 ),
2828 )
2929 creds = git_helper .get (Credential (protocol = "https" , host = "foo.com" , path = "foo.git" ))
3030 assert run .call_args .args [0 ] == ["git-credential-foo" , "get" ]
31- assert run .call_args .kwargs .get ("input" ) == os . linesep .join (
31+ assert run .call_args .kwargs .get ("input" ) == " \n " .join (
3232 ["protocol=https" , "host=foo.com" , "" ]
3333 )
3434 assert creds == Credential (
url = "https://foo:[email protected] " )
@@ -39,12 +39,12 @@ def test_subprocess_get_use_http_path(git_helper, mocker):
3939 run = mocker .patch (
4040 "subprocess.run" ,
4141 return_value = mocker .Mock (
42- stdout = os . linesep .join (["username=foo" , "password=bar" , "" ])
42+ stdout = " \n " .join (["username=foo" , "password=bar" , "" ])
4343 ),
4444 )
4545 creds = git_helper .get (Credential (protocol = "https" , host = "foo.com" , path = "foo.git" ))
4646 assert run .call_args .args [0 ] == ["git-credential-foo" , "get" ]
47- assert run .call_args .kwargs .get ("input" ) == os . linesep .join (
47+ assert run .call_args .kwargs .get ("input" ) == " \n " .join (
4848 ["protocol=https" , "host=foo.com" , "path=foo.git" , "" ]
4949 )
5050 assert creds == Credential (username = "foo" , password = "bar" )
@@ -59,7 +59,7 @@ def test_subprocess_get_failed(git_helper, mocker):
5959
6060
6161def test_subprocess_get_no_output (git_helper , mocker ):
62- mocker .patch ("subprocess.run" , return_value = mocker .Mock (stdout = os . linesep ))
62+ mocker .patch ("subprocess.run" , return_value = mocker .Mock (stdout = " \n " ))
6363 with pytest .raises (CredentialNotFoundError ):
6464 git_helper .get (Credential (protocol = "https" , host = "foo.com" ))
6565
@@ -70,7 +70,7 @@ def test_subprocess_store(git_helper, mocker):
7070 Credential (protocol = "https" , host = "foo.com" , username = "foo" , password = "bar" )
7171 )
7272 assert run .call_args .args [0 ] == ["git-credential-foo" , "store" ]
73- assert run .call_args .kwargs .get ("input" ) == os . linesep .join (
73+ assert run .call_args .kwargs .get ("input" ) == " \n " .join (
7474 ["protocol=https" , "host=foo.com" , "username=foo" , "password=bar" , "" ]
7575 )
7676
@@ -79,7 +79,7 @@ def test_subprocess_erase(git_helper, mocker):
7979 run = mocker .patch ("subprocess.run" )
8080 git_helper .erase (Credential (protocol = "https" , host = "foo.com" ))
8181 assert run .call_args .args [0 ] == ["git-credential-foo" , "erase" ]
82- assert run .call_args .kwargs .get ("input" ) == os . linesep .join (
82+ assert run .call_args .kwargs .get ("input" ) == " \n " .join (
8383 ["protocol=https" , "host=foo.com" , "" ]
8484 )
8585
@@ -149,7 +149,7 @@ def test_memory_helper_prompt_askpass(mocker):
149149 "subprocess.run" ,
150150 side_effect = [
151151 mocker .Mock (stdout = "foo" ),
152- mocker .Mock (stdout = os . linesep .join (["bar" , "" ])),
152+ mocker .Mock (stdout = " \n " .join (["bar" , "" ])),
153153 ],
154154 )
155155 expected = Credential (
0 commit comments