summaryrefslogtreecommitdiff
path: root/tests/unit/sshadapter_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/sshadapter_test.py')
-rw-r--r--tests/unit/sshadapter_test.py27
1 files changed, 17 insertions, 10 deletions
diff --git a/tests/unit/sshadapter_test.py b/tests/unit/sshadapter_test.py
index ddee592..874239a 100644
--- a/tests/unit/sshadapter_test.py
+++ b/tests/unit/sshadapter_test.py
@@ -2,31 +2,38 @@ import unittest
import docker
from docker.transport.sshconn import SSHSocket
+
class SSHAdapterTest(unittest.TestCase):
- def test_ssh_hostname_prefix_trim(self):
- conn = docker.transport.SSHHTTPAdapter(base_url="ssh://user@hostname:1234", shell_out=True)
+ @staticmethod
+ def test_ssh_hostname_prefix_trim():
+ conn = docker.transport.SSHHTTPAdapter(
+ base_url="ssh://user@hostname:1234", shell_out=True)
assert conn.ssh_host == "user@hostname:1234"
- def test_ssh_parse_url(self):
+ @staticmethod
+ def test_ssh_parse_url():
c = SSHSocket(host="user@hostname:1234")
assert c.host == "hostname"
assert c.port == "1234"
assert c.user == "user"
- def test_ssh_parse_hostname_only(self):
+ @staticmethod
+ def test_ssh_parse_hostname_only():
c = SSHSocket(host="hostname")
assert c.host == "hostname"
- assert c.port == None
- assert c.user == None
+ assert c.port is None
+ assert c.user is None
- def test_ssh_parse_user_and_hostname(self):
+ @staticmethod
+ def test_ssh_parse_user_and_hostname():
c = SSHSocket(host="user@hostname")
assert c.host == "hostname"
- assert c.port == None
+ assert c.port is None
assert c.user == "user"
- def test_ssh_parse_hostname_and_port(self):
+ @staticmethod
+ def test_ssh_parse_hostname_and_port():
c = SSHSocket(host="hostname:22")
assert c.host == "hostname"
assert c.port == "22"
- assert c.user == None \ No newline at end of file
+ assert c.user is None