50
50
client = paramiko .SSHClient ()
51
51
client .load_system_host_keys ()
52
52
client .set_missing_host_key_policy (paramiko .AutoAddPolicy ())
53
- client .connect ('localhost ' , username = os .getenv ('USER' ), sock = proxy )
53
+ client .connect ('127.0.0.1 ' , username = os .getenv ('USER' ), sock = proxy )
54
54
55
55
no_local_ssh = False
56
56
@@ -342,7 +342,7 @@ def test_datasink_to_s3(dummy_input, tmpdir):
342
342
aws_access_key_id = 'mykey' ,
343
343
aws_secret_access_key = 'mysecret' ,
344
344
service_name = 's3' ,
345
- endpoint_url = 'http://localhost :4567' ,
345
+ endpoint_url = 'http://127.0.0.1 :4567' ,
346
346
use_ssl = False )
347
347
resource .meta .client .meta .events .unregister ('before-sign.s3' , fix_s3_host )
348
348
@@ -659,7 +659,7 @@ def _mock_get_ssh_client(self):
659
659
client = paramiko .SSHClient ()
660
660
client .load_system_host_keys ()
661
661
client .set_missing_host_key_policy (paramiko .AutoAddPolicy ())
662
- client .connect ('localhost ' , username = os .getenv ('USER' ), sock = proxy )
662
+ client .connect ('127.0.0.1 ' , username = os .getenv ('USER' ), sock = proxy )
663
663
return client
664
664
MockSSHDataGrabber = copy .copy (nio .SSHDataGrabber )
665
665
MockSSHDataGrabber ._get_ssh_client = _mock_get_ssh_client
@@ -668,7 +668,7 @@ def _mock_get_ssh_client(self):
668
668
ssh_grabber = MockSSHDataGrabber (infields = ['test' ],
669
669
outfields = ['test_file' ])
670
670
ssh_grabber .inputs .base_directory = str (source_dir )
671
- ssh_grabber .inputs .hostname = 'localhost '
671
+ ssh_grabber .inputs .hostname = '127.0.0.1 '
672
672
ssh_grabber .inputs .field_template = dict (test_file = '%s.hdr' )
673
673
ssh_grabber .inputs .template = ''
674
674
ssh_grabber .inputs .template_args = dict (test_file = [['test' ]])
0 commit comments