summaryrefslogtreecommitdiffhomepage
path: root/tests/test_util.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_util.py')
-rw-r--r--tests/test_util.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/tests/test_util.py b/tests/test_util.py
index 705baa14..a99dbea8 100644
--- a/tests/test_util.py
+++ b/tests/test_util.py
@@ -26,9 +26,11 @@ import os
from hashlib import sha1
import unittest
+import paramiko
import paramiko.util
+from paramiko import SSHConfig
from paramiko.util import lookup_ssh_host_config as host_config, safe_string
-from paramiko.py3compat import StringIO, byte_ord, b
+from paramiko.py3compat import StringIO, byte_ord
# Note some lines in this configuration have trailing spaces on purpose
@@ -62,16 +64,12 @@ BGQ3GQ/Fc7SX6gkpXkwcZryoi4kNFhHu5LvHcZPdxXV1D+uTMfGS1eyd2Yz/DoNWXNAl8TI0cAsW\
"""
-# for test 1:
-from paramiko import *
-
-
class UtilTest(unittest.TestCase):
def test_import(self):
"""
verify that all the classes can be imported from paramiko.
"""
- symbols = list(globals().keys())
+ symbols = paramiko.__all__
self.assertTrue("Transport" in symbols)
self.assertTrue("SSHClient" in symbols)
self.assertTrue("MissingHostKeyPolicy" in symbols)
@@ -172,7 +170,7 @@ class UtilTest(unittest.TestCase):
hex = "".join(["%02x" % byte_ord(c) for c in x])
self.assertEqual(
hex,
- "9110e2f6793b69363e58173e9436b13a5a4b339005741d5c680e505f57d871347b4239f14fb5c46e857d5e100424873ba849ac699cea98d729e57b3e84378e8b",
+ "9110e2f6793b69363e58173e9436b13a5a4b339005741d5c680e505f57d871347b4239f14fb5c46e857d5e100424873ba849ac699cea98d729e57b3e84378e8b", # noqa
)
def test_host_keys(self):