summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJeff Forcier <jeff@bitprophet.org>2014-01-08 12:44:12 -0800
committerJeff Forcier <jeff@bitprophet.org>2014-01-08 12:44:12 -0800
commit6d326fcde20dece926c2cf661991590e20a00eab (patch)
tree0652235edae0c60741c93d4deeb31b45de2151c2
parent74e06aff9e1869dece030b61e99365150fb2e315 (diff)
Saner (to me) positive assertion
-rw-r--r--tests/test_client.py5
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)