diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_client.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/test_client.py b/tests/test_client.py index ad80e720..fae1d329 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -20,6 +20,7 @@ Some unit tests for SSHClient. """ +from __future__ import with_statement # Python 2.5 support import socket import threading import time @@ -206,7 +207,9 @@ class SSHClientTest (unittest.TestCase): self.assertEquals(public_host_key, client.get_host_keys()[host_id]['ssh-rsa']) client.save_host_keys(localname) - self.assertEquals(len(host_id) + 210, os.path.getsize(localname)) + + with open(localname) as fd: + assert host_id in fd.read() os.unlink(localname) |