diff options
author | Jeff Forcier <jeff@bitprophet.org> | 2012-11-05 17:04:45 -0800 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2012-11-05 17:04:52 -0800 |
commit | 928c06274816669a94753b80f493a2e4e1b9357a (patch) | |
tree | 90e0e6ad88a493a54f949e62d9c83e80a639ebe1 /tests | |
parent | fb5d245b3148250bb3d7d6b46c2ec2b7914982a7 (diff) |
Add failing test(s) re ProxyCommand config parsing
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_util.py | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/tests/test_util.py b/tests/test_util.py index 458709b2..83de0044 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -27,6 +27,7 @@ import os import unittest from Crypto.Hash import SHA import paramiko.util +from paramiko.util import lookup_ssh_host_config as host_config from util import ParamikoTest @@ -151,7 +152,7 @@ class UtilTest(ParamikoTest): x = rng.read(32) self.assertEquals(len(x), 32) - def test_7_host_config_expose_issue_33(self): + def test_7_host_config_expose_ssh_issue_33(self): test_config_file = """ Host www13.* Port 22 @@ -194,3 +195,22 @@ Host * raise AssertionError('foo') self.assertRaises(AssertionError, lambda: paramiko.util.retry_on_signal(raises_other_exception)) + + def test_9_proxycommand_config_parsing(self): + """ + ProxyCommand should not split on equals signs within the value. + """ + conf = """ +Host space-delimited + ProxyCommand foo bar=biz baz + +Host equals-delimited + ProxyCommand=foo bar=biz baz +""" + f = cStringIO.StringIO(conf) + config = paramiko.util.parse_ssh_config(f) + for host in ('space-delimited', 'equals-delimited'): + self.assertEquals( + host_config(host, config)['proxycommand'], + 'foo bar=biz baz' + ) |