diff options
author | qqo <qqo@users.noreply.github.com> | 2016-07-20 16:06:22 +0300 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2016-12-05 18:59:23 -0800 |
commit | b788056982e415d4763d930a650fac437bd076ce (patch) | |
tree | 0effed9280f8ae420e2362af89e6cf4eb2871b24 | |
parent | d3ad14d3cebda84a37be4baf6a018f1064e3a325 (diff) |
Add tests for ~ expansion inside proxycommand
-rw-r--r-- | tests/test_util.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/test_util.py b/tests/test_util.py index e25f0563..87624711 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -248,6 +248,19 @@ Host * val ) + def test_11_proxycommand_tilde_expansion(self): + """ + Tilde (~) should be expanded inside ProxyCommand + """ + config = paramiko.util.parse_ssh_config(StringIO(""" +Host test + ProxyCommand ssh -F ~/.ssh/test_config bastion nc %h %p +""")) + self.assertEqual( + 'ssh -F %s/.ssh/test_config bastion nc test 22' % os.path.expanduser('~'), + host_config('test', config)['proxycommand'] + ) + def test_11_host_config_test_negation(self): test_config_file = """ Host www13.* !*.example.com |