Saner (to me) positive assertion

This commit is contained in:
Jeff Forcier 2014-01-08 12:44:12 -08:00
parent 74e06aff9e
commit 6d326fcde2
1 changed files with 4 additions and 1 deletions

View File

@ -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)