From 78d9e4834cb9e4bb0060b419c8677660b016f4d2 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Wed, 8 Jan 2014 12:35:46 -0800 Subject: [PATCH] No need for 'self.tc' within a single test :) --- tests/test_client.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/test_client.py b/tests/test_client.py index 7aaa1bf..7be2d73 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -196,14 +196,14 @@ class SSHClientTest (unittest.TestCase): public_host_key = paramiko.RSAKey(data=str(host_key)) localname = os.tempnam() - self.tc = paramiko.SSHClient() - self.assertEquals(0, len(self.tc.get_host_keys())) + client = paramiko.SSHClient() + self.assertEquals(0, len(client.get_host_keys())) - self.tc.get_host_keys().add('[%s]:%d' % (self.addr, self.port), 'ssh-rsa', public_host_key) - self.assertEquals(1, len(self.tc.get_host_keys())) - self.assertEquals(public_host_key, self.tc.get_host_keys()['[%s]:%d' % (self.addr, self.port)]['ssh-rsa']) + client.get_host_keys().add('[%s]:%d' % (self.addr, self.port), 'ssh-rsa', public_host_key) + self.assertEquals(1, len(client.get_host_keys())) + self.assertEquals(public_host_key, client.get_host_keys()['[%s]:%d' % (self.addr, self.port)]['ssh-rsa']) - self.tc.save_host_keys(localname) + client.save_host_keys(localname) self.assertEquals(len('[%s]:%d' % (self.addr, self.port)) + 210, os.path.getsize(localname)) os.unlink(localname)