diff options
author | Jeff Forcier <jeff@bitprophet.org> | 2019-06-14 14:34:07 -0400 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2019-06-14 14:34:07 -0400 |
commit | ff799bc51b985ac95f76ea5569327a716ffaedc0 (patch) | |
tree | 527fcf080ff9428305893c033871bb8537119d92 /tests/test_client.py | |
parent | 03cf3215670bd4467d1296173c4c184a4be089ab (diff) | |
parent | f19d8ed2528dfc7bcd96f00fd9dde4199c5ac864 (diff) |
Merge branch '2.3' into 2.4
Diffstat (limited to 'tests/test_client.py')
-rw-r--r-- | tests/test_client.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/tests/test_client.py b/tests/test_client.py index 98f72143..9191fc01 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -371,15 +371,13 @@ class SSHClientTest(ClientTest): 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) @@ -430,7 +428,7 @@ class SSHClientTest(ClientTest): 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) |