diff options
author | Nick Pillitteri <nick@tshlabs.org> | 2016-01-08 16:47:54 -0500 |
---|---|---|
committer | Nick Pillitteri <nick@tshlabs.org> | 2016-01-08 17:08:56 -0500 |
commit | 0c93fa94fbbb8d6284ee89e82298cc0e580203b4 (patch) | |
tree | 5ec90339f409177c52b83cf6ab701d6137b981e9 /tests/test_util.py | |
parent | d0d0c32b92bebfec3ff2627b30d3d4732f10ce89 (diff) |
Update SSHConfig.parse to strip leading and trailing whitespace
Fixes #499
Diffstat (limited to 'tests/test_util.py')
-rw-r--r-- | tests/test_util.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/test_util.py b/tests/test_util.py index 0e7d0b2b..bca6f5d5 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -30,6 +30,7 @@ from paramiko.py3compat import StringIO, byte_ord, b from tests.util import ParamikoTest +# Note some lines in this configuration have trailing spaces on purpose test_config_file = """\ Host * User robey @@ -105,7 +106,7 @@ class UtilTest(ParamikoTest): self.assertEqual(config._config, [{'host': ['*'], 'config': {}}, {'host': ['*'], 'config': {'identityfile': ['~/.ssh/id_rsa'], 'user': 'robey'}}, {'host': ['*.example.com'], 'config': {'user': 'bjork', 'port': '3333'}}, - {'host': ['*'], 'config': {'crazy': 'something dumb '}}, + {'host': ['*'], 'config': {'crazy': 'something dumb'}}, {'host': ['spoo.example.com'], 'config': {'crazy': 'something else'}}]) def test_3_host_config(self): @@ -114,14 +115,14 @@ class UtilTest(ParamikoTest): config = paramiko.util.parse_ssh_config(f) for host, values in { - 'irc.danger.com': {'crazy': 'something dumb ', + 'irc.danger.com': {'crazy': 'something dumb', 'hostname': 'irc.danger.com', 'user': 'robey'}, - 'irc.example.com': {'crazy': 'something dumb ', + 'irc.example.com': {'crazy': 'something dumb', 'hostname': 'irc.example.com', 'user': 'robey', 'port': '3333'}, - 'spoo.example.com': {'crazy': 'something dumb ', + 'spoo.example.com': {'crazy': 'something dumb', 'hostname': 'spoo.example.com', 'user': 'robey', 'port': '3333'} |