예제 #1
0
    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
예제 #2
0
    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
예제 #3
0
    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
예제 #4
0
    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
예제 #5
0
    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
예제 #6
0
    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
예제 #7
0
    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
예제 #8
0
    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