assertTrue doesn't exist in py23
This commit is contained in:
parent
ccc1046a5c
commit
8087fa5a29
|
@ -1,5 +1,3 @@
|
||||||
#!/usr/bin/python
|
|
||||||
|
|
||||||
# Copyright (C) 2006 Robey Pointer <robey@lag.net>
|
# Copyright (C) 2006 Robey Pointer <robey@lag.net>
|
||||||
#
|
#
|
||||||
# This file is part of paramiko.
|
# This file is part of paramiko.
|
||||||
|
@ -70,7 +68,7 @@ class HostKeysTest (unittest.TestCase):
|
||||||
x = hostdict['foo.example.com']
|
x = hostdict['foo.example.com']
|
||||||
fp = paramiko.util.hexify(x['ssh-rsa'].get_fingerprint())
|
fp = paramiko.util.hexify(x['ssh-rsa'].get_fingerprint())
|
||||||
self.assertEquals('7EC91BB336CB6D810B124B1353C32396', fp)
|
self.assertEquals('7EC91BB336CB6D810B124B1353C32396', fp)
|
||||||
self.assertTrue(hostdict.check('foo.example.com', key))
|
self.assert_(hostdict.check('foo.example.com', key))
|
||||||
|
|
||||||
def test_3_dict(self):
|
def test_3_dict(self):
|
||||||
hostdict = paramiko.HostKeys('hostfile.temp')
|
hostdict = paramiko.HostKeys('hostfile.temp')
|
||||||
|
@ -79,7 +77,7 @@ class HostKeysTest (unittest.TestCase):
|
||||||
self.assert_(hostdict.has_key('secure.example.com'))
|
self.assert_(hostdict.has_key('secure.example.com'))
|
||||||
self.assert_(not hostdict.has_key('not.example.com'))
|
self.assert_(not hostdict.has_key('not.example.com'))
|
||||||
x = hostdict.get('secure.example.com', None)
|
x = hostdict.get('secure.example.com', None)
|
||||||
self.assertTrue(x is not None)
|
self.assert_(x is not None)
|
||||||
fp = paramiko.util.hexify(x['ssh-rsa'].get_fingerprint())
|
fp = paramiko.util.hexify(x['ssh-rsa'].get_fingerprint())
|
||||||
self.assertEquals('E6684DB30E109B67B70FF1DC5C7F1363', fp)
|
self.assertEquals('E6684DB30E109B67B70FF1DC5C7F1363', fp)
|
||||||
i = 0
|
i = 0
|
||||||
|
|
Loading…
Reference in New Issue