diff options
author | Robey Pointer <robey@lag.net> | 2006-08-01 11:21:43 -0700 |
---|---|---|
committer | Robey Pointer <robey@lag.net> | 2006-08-01 11:21:43 -0700 |
commit | 074dc36e6b277b5ffc6ac910fdc11934e38959f4 (patch) | |
tree | 95f9e7cfd2e0f56fed7598cf2af966162e9ea001 /tests/test_transport.py | |
parent | 7ac433a6ac7b2cdf8608e8571102d599a15febde (diff) |
[project @ robey@lag.net-20060801182143-088ff687e0945937]
use hexlify in tests
Diffstat (limited to 'tests/test_transport.py')
-rw-r--r-- | tests/test_transport.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/tests/test_transport.py b/tests/test_transport.py index 75d33419..e102fe09 100644 --- a/tests/test_transport.py +++ b/tests/test_transport.py @@ -20,10 +20,15 @@ Some unit tests for the ssh2 protocol in Transport. """ -import sys, time, threading, unittest +from binascii import hexlify, unhexlify import select +import sys +import time +import threading +import unittest + from paramiko import Transport, SecurityOptions, ServerInterface, RSAKey, DSSKey, \ - SSHException, BadAuthenticationType, InteractiveQuery, util, ChannelException + SSHException, BadAuthenticationType, InteractiveQuery, ChannelException from paramiko import AUTH_FAILED, AUTH_PARTIALLY_SUCCESSFUL, AUTH_SUCCESSFUL from paramiko import OPEN_SUCCEEDED, OPEN_FAILED_ADMINISTRATIVELY_PROHIBITED from loop import LoopSocket @@ -132,11 +137,11 @@ class TransportTest (unittest.TestCase): def test_2_compute_key(self): self.tc.K = 123281095979686581523377256114209720774539068973101330872763622971399429481072519713536292772709507296759612401802191955568143056534122385270077606457721553469730659233569339356140085284052436697480759510519672848743794433460113118986816826624865291116513647975790797391795651716378444844877749505443714557929L - self.tc.H = util.unhexify('0C8307CDE6856FF30BA93684EB0F04C2520E9ED3') + self.tc.H = unhexlify('0C8307CDE6856FF30BA93684EB0F04C2520E9ED3') self.tc.session_id = self.tc.H key = self.tc._compute_key('C', 32) self.assertEquals('207E66594CA87C44ECCBA3B3CD39FDDB378E6FDB0F97C54B2AA0CFBF900CD995', - util.hexify(key)) + hexlify(key).upper()) def test_3_simple(self): """ |