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
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"
def test_ssh_parse_url(self): 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): c = SSHSocket(host="hostname") assert c.host == "hostname" assert c.port == None assert c.user == None
def test_ssh_parse_hostname_only(): c = SSHSocket(host="hostname") assert c.host == "hostname" assert c.port is None assert c.user is None