def it_calls_ssh_with_a_complex_host(mock): env.host_string = '[email protected]:9999' env.key_filename = None ssh() expected = [call('ssh -A -t -p 9999 [email protected]'.split())] print mock.call.call_args_list assert mock.call.call_args_list == expected
def it_calls_ssh(mock): env.user = '******' env.host_string = 'example.com' env.key_filename = None ssh() expected = [call('ssh -A -t [email protected]'.split())] assert mock.call.call_args_list == expected
def it_calls_ssh_with_a_key_filename_list(mock): env.user = '******' env.host_string = 'example.com' env.key_filename = ['test.pem'] ssh() expected = [call('ssh -A -t -i test.pem [email protected]'.split())] assert mock.call.call_args_list == expected
def it_calls_ssh_with_a_complex_host(mock): env.host_string = "[email protected]:9999" env.key_filename = None ssh() expected = [call("ssh -A -t -p 9999 [email protected]".split())] print mock.call.call_args_list assert mock.call.call_args_list == expected
def it_calls_ssh_with_a_key_filename_list(mock): env.user = "******" env.host_string = "example.com" env.key_filename = ["test.pem"] ssh() expected = [call("ssh -A -t -i test.pem [email protected]".split())] assert mock.call.call_args_list == expected
def it_calls_ssh(mock): env.user = "******" env.host_string = "example.com" env.key_filename = None ssh() expected = [call("ssh -A -t [email protected]".split())] assert mock.call.call_args_list == expected