summaryrefslogtreecommitdiffhomepage
path: root/tests/test_client.py
diff options
context:
space:
mode:
authorJeff Forcier <jeff@bitprophet.org>2019-06-14 14:33:30 -0400
committerJeff Forcier <jeff@bitprophet.org>2019-06-14 14:33:30 -0400
commitf19d8ed2528dfc7bcd96f00fd9dde4199c5ac864 (patch)
treebf2b04f2c1a7a55164af76573c43821b8af97ef4 /tests/test_client.py
parent36e5b3e21b155664d97c0cbf46dad16c440130fc (diff)
parent3f841c8087af1e573fcf6be1b05c734dda565d59 (diff)
Merge branch '2.2' into 2.3
Diffstat (limited to 'tests/test_client.py')
-rw-r--r--tests/test_client.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/tests/test_client.py b/tests/test_client.py
index fec1485e..bfbd395f 100644
--- a/tests/test_client.py
+++ b/tests/test_client.py
@@ -338,15 +338,13 @@ class SSHClientTest(unittest.TestCase):
os.close(fd)
client = paramiko.SSHClient()
- self.assertEquals(0, len(client.get_host_keys()))
+ assert len(client.get_host_keys()) == 0
host_id = "[%s]:%d" % (self.addr, self.port)
client.get_host_keys().add(host_id, "ssh-rsa", public_host_key)
- self.assertEquals(1, len(client.get_host_keys()))
- self.assertEquals(
- public_host_key, client.get_host_keys()[host_id]["ssh-rsa"]
- )
+ assert len(client.get_host_keys()) == 1
+ assert public_host_key == client.get_host_keys()[host_id]["ssh-rsa"]
client.save_host_keys(localname)
@@ -397,7 +395,7 @@ class SSHClientTest(unittest.TestCase):
with paramiko.SSHClient() as tc:
self.tc = tc
self.tc.set_missing_host_key_policy(paramiko.AutoAddPolicy())
- self.assertEquals(0, len(self.tc.get_host_keys()))
+ assert len(self.tc.get_host_keys()) == 0
self.tc.connect(**dict(self.connect_kwargs, password="pygmalion"))
self.event.wait(1.0)