diff options
author | Scott Maxwell <scott@codecobblers.com> | 2013-11-19 10:09:08 -0800 |
---|---|---|
committer | Scott Maxwell <scott@codecobblers.com> | 2013-11-19 10:09:08 -0800 |
commit | 6d75c75e643c3a109075e86e72b08221c76088cc (patch) | |
tree | 95dd49cbe6d9d194f337a8ae5310800a2f103430 /tests/test_util.py | |
parent | 981f768a62402a5aaa9f9f0ddfb4e14faa0d4442 (diff) |
Remove byte conversions and unhexlify calls that we only needed for Py2.5 support and use the `b` byte string marker instead
Diffstat (limited to 'tests/test_util.py')
-rw-r--r-- | tests/test_util.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_util.py b/tests/test_util.py index be107195..4f85c391 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -137,7 +137,7 @@ class UtilTest(ParamikoTest): ) def test_4_generate_key_bytes(self): - x = paramiko.util.generate_key_bytes(SHA, b('ABCDEFGH'), 'This is my secret passphrase.', 64) + x = paramiko.util.generate_key_bytes(SHA, b'ABCDEFGH', 'This is my secret passphrase.', 64) hex = ''.join(['%02x' % byte_ord(c) for c in x]) self.assertEqual(hex, '9110e2f6793b69363e58173e9436b13a5a4b339005741d5c680e505f57d871347b4239f14fb5c46e857d5e100424873ba849ac699cea98d729e57b3e84378e8b') @@ -150,7 +150,7 @@ class UtilTest(ParamikoTest): self.assertEqual(1, len(list(hostdict.values())[0])) self.assertEqual(1, len(list(hostdict.values())[1])) fp = hexlify(hostdict['secure.example.com']['ssh-rsa'].get_fingerprint()).upper() - self.assertEqual(b('E6684DB30E109B67B70FF1DC5C7F1363'), fp) + self.assertEqual(b'E6684DB30E109B67B70FF1DC5C7F1363', fp) finally: os.unlink('hostfile.temp') |