From: Zack Cerza Date: Fri, 20 Sep 2013 13:38:23 +0000 (-0500) Subject: Update test_connect() to reflect API changes X-Git-Tag: 1.1.0~1864^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F102%2Fhead;p=teuthology.git Update test_connect() to reflect API changes Looks like paramiko changed a bit internally. All unit tests pass now! --- diff --git a/teuthology/orchestra/test/test_connection.py b/teuthology/orchestra/test/test_connection.py index 371722bd..32146190 100644 --- a/teuthology/orchestra/test/test_connection.py +++ b/teuthology/orchestra/test/test_connection.py @@ -27,22 +27,22 @@ def test_split_user_empty_user(): @nose.with_setup(fudge.clear_expectations) @fudge.with_fakes def test_connect(): - sshclient = fudge.Fake('SSHClient') - ssh = sshclient.expects_call().with_args().returns_fake() - ssh.remember_order() + ssh = fudge.Fake('SSHClient') + ssh.expects_call().with_args().returns(ssh) + ssh.expects('set_missing_host_key_policy') ssh.expects('load_system_host_keys').with_args() ssh.expects('connect').with_args( hostname='orchestra.test.newdream.net.invalid', username='jdoe', timeout=60, - ) + ) transport = ssh.expects('get_transport').with_args().returns_fake() transport.remember_order() transport.expects('set_keepalive').with_args(False) got = connection.connect( 'jdoe@orchestra.test.newdream.net.invalid', - _SSHClient=sshclient, - ) + _SSHClient=ssh, + ) assert got is ssh @nose.with_setup(fudge.clear_expectations)