]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
Update test_connect() to reflect API changes 102/head
authorZack Cerza <zack@cerza.org>
Fri, 20 Sep 2013 13:38:23 +0000 (08:38 -0500)
committerZack Cerza <zack@cerza.org>
Fri, 20 Sep 2013 13:39:36 +0000 (08:39 -0500)
Looks like paramiko changed a bit internally. All unit tests pass now!

teuthology/orchestra/test/test_connection.py

index 371722bd95caf861b961094d0aa44af3f2eab2c4..32146190a3c298b1379accb79cf136f1daa41f69 100644 (file)
@@ -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)