summaryrefslogtreecommitdiffhomepage
path: root/tests/test_client.py
diff options
context:
space:
mode:
authorJeff Forcier <jeff@bitprophet.org>2019-12-03 12:09:31 -0500
committerJeff Forcier <jeff@bitprophet.org>2019-12-03 12:09:31 -0500
commit4066f591e43dbf247c4d841f6de7be6252766842 (patch)
tree139cfe6b245e086500b9611a1f0c51f182a28ba2 /tests/test_client.py
parent9292ef2a347bfca441bde90d145bf6774c1ba08b (diff)
Modernize a test that sometimes fails for no obvious reason on travis only =/
Diffstat (limited to 'tests/test_client.py')
-rw-r--r--tests/test_client.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/test_client.py b/tests/test_client.py
index ad5c36ad..60ad310c 100644
--- a/tests/test_client.py
+++ b/tests/test_client.py
@@ -407,15 +407,15 @@ class SSHClientTest(ClientTest):
self.tc = SSHClient()
self.tc.set_missing_host_key_policy(paramiko.AutoAddPolicy())
- self.assertEqual(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)
- self.assertTrue(self.event.is_set())
- self.assertTrue(self.ts.is_active())
+ assert self.event.is_set()
+ assert self.ts.is_active()
p = weakref.ref(self.tc._transport.packetizer)
- self.assertTrue(p() is not None)
+ assert p() is not None
self.tc.close()
del self.tc
@@ -425,7 +425,7 @@ class SSHClientTest(ClientTest):
gc.collect()
gc.collect()
- self.assertTrue(p() is None)
+ assert p() is None
def test_client_can_be_used_as_context_manager(self):
"""