Esempio n. 1
0
 def test_ssh_parse_hostname_and_port(self):
     c = SSHSocket(host="hostname:22")
     assert c.host == "hostname"
     assert c.port == "22"
     assert c.user == None
Esempio n. 2
0
 def test_ssh_parse_user_and_hostname(self):
     c = SSHSocket(host="user@hostname")
     assert c.host == "hostname"
     assert c.port == None
     assert c.user == "user"
Esempio n. 3
0
 def test_ssh_parse_url(self):
     c = SSHSocket(host="user@hostname:1234")
     assert c.host == "hostname"
     assert c.port == "1234"
     assert c.user == "user"
Esempio n. 4
0
 def test_ssh_parse_hostname_only(self):
     c = SSHSocket(host="hostname")
     assert c.host == "hostname"
     assert c.port == None
     assert c.user == None
Esempio n. 5
0
 def test_ssh_parse_hostname_only():
     c = SSHSocket(host="hostname")
     assert c.host == "hostname"
     assert c.port is None
     assert c.user is None