diff options
author | Søren Løvborg <soeren.j.loevborg@siemens.com> | 2014-09-19 15:00:18 +0200 |
---|---|---|
committer | Søren Løvborg <soeren.j.loevborg@siemens.com> | 2014-09-19 15:00:18 +0200 |
commit | 8e2d4321509cf942c3d499b643b1978b1addaebf (patch) | |
tree | 2a698fb54a51171ef20e930777b312ab6126f2e1 /tests/test_util.py | |
parent | 5b832842f1390dddcd45c2a891c53e3482474979 (diff) |
SSHConfig.get_hostnames: List literal hostnames from SSH config
Diffstat (limited to 'tests/test_util.py')
-rw-r--r-- | tests/test_util.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/test_util.py b/tests/test_util.py index 35e15765..f961fbbc 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -349,6 +349,11 @@ IdentityFile something_%l_using_fqdn config.parse(config_file) self.assertEqual(config.lookup("abcqwerty")["hostname"], "127.0.0.1") + def test_14_get_hostnames(self): + f = StringIO(test_config_file) + config = paramiko.util.parse_ssh_config(f) + self.assertEqual(config.get_hostnames(), set(['*', '*.example.com', 'spoo.example.com'])) + def test_quoted_host_names(self): test_config_file = """\ Host "param pam" param "pam" |