diff options
author | Jeff Forcier <jeff@bitprophet.org> | 2023-01-09 19:32:57 -0500 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2023-01-09 23:26:00 -0500 |
commit | 3e87f05b57213cc539670f85ac7ea8ccddb9e5c4 (patch) | |
tree | 5f3442839198de82f1376dbc53a0916856a8ebb9 /tests | |
parent | 768f3e238b26127cee5cf5d4d18a17a40c349c9e (diff) |
Migrate some byte related helpers around
I feel like we should be able to just nuke byte_chr and friends at this
point, but it's not entirely obvious, so let's rock that boat later.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/loop.py | 2 | ||||
-rw-r--r-- | tests/test_pkey.py | 4 | ||||
-rw-r--r-- | tests/test_transport.py | 3 | ||||
-rw-r--r-- | tests/test_util.py | 2 |
4 files changed, 6 insertions, 5 deletions
diff --git a/tests/loop.py b/tests/loop.py index 6de4b164..51dc6308 100644 --- a/tests/loop.py +++ b/tests/loop.py @@ -19,7 +19,7 @@ import socket import threading -from paramiko.common import asbytes +from paramiko.util import asbytes class LoopSocket(object): diff --git a/tests/test_pkey.py b/tests/test_pkey.py index a2376fa9..bc1503ab 100644 --- a/tests/test_pkey.py +++ b/tests/test_pkey.py @@ -36,8 +36,8 @@ from paramiko import ( util, SSHException, ) -from paramiko.py3compat import StringIO, byte_chr, b, bytes, PY2 -from paramiko.common import o600 +from paramiko.py3compat import StringIO, b, bytes, PY2 +from paramiko.common import o600, byte_chr from cryptography.exceptions import UnsupportedAlgorithm from cryptography.hazmat.primitives.asymmetric.rsa import RSAPrivateNumbers diff --git a/tests/test_transport.py b/tests/test_transport.py index 98a7d30d..5263c038 100644 --- a/tests/test_transport.py +++ b/tests/test_transport.py @@ -57,8 +57,9 @@ from paramiko.common import ( MSG_USERAUTH_SUCCESS, cMSG_CHANNEL_WINDOW_ADJUST, cMSG_UNIMPLEMENTED, + byte_chr, ) -from paramiko.py3compat import bytes, byte_chr +from paramiko.py3compat import bytes from paramiko.message import Message from .util import needs_builtin, _support, requires_sha1_signing, slow diff --git a/tests/test_util.py b/tests/test_util.py index 0e485759..1869a7bb 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -29,7 +29,7 @@ import unittest import paramiko import paramiko.util from paramiko.util import safe_string -from paramiko.py3compat import byte_ord +from paramiko.common import byte_ord test_hosts_file = """\ |