diff options
author | Jeff Forcier <jeff@bitprophet.org> | 2019-12-02 18:18:46 -0500 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2019-12-02 18:21:23 -0500 |
commit | e5067823f4e710b93ed4e4012adce2adf2bf09f7 (patch) | |
tree | fea3f76e9029aa5ac830928ec031c2bf7cde3456 /tests | |
parent | 4a95e1f88b0996c937c98d31c94a51a450984019 (diff) |
Tweak some old test names for easier targeting
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_config.py | 43 |
1 files changed, 26 insertions, 17 deletions
diff --git a/tests/test_config.py b/tests/test_config.py index f2c89bb5..f8312b12 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -61,34 +61,43 @@ class TestSSHConfig(object): ] assert self.config._config == expected - def test_host_config(self): - for host, values in { - "irc.danger.com": { + @mark.parametrize("host,values", ( + ( + "irc.danger.com", + { "crazy": "something dumb", "hostname": "irc.danger.com", "user": "robey", }, - "irc.example.com": { + ), + ( + "irc.example.com", + { "crazy": "something dumb", "hostname": "irc.example.com", "user": "robey", "port": "3333", }, - "spoo.example.com": { + ), + ( + "spoo.example.com", + { "crazy": "something dumb", "hostname": "spoo.example.com", "user": "robey", "port": "3333", }, - }.items(): - values = dict( - values, - hostname=host, - identityfile=[expanduser("~/.ssh/id_rsa")], - ) - assert lookup_ssh_host_config(host, self.config) == values - - def test_host_config_expose_fabric_issue_33(self): + ), + )) + def test_host_config(self, host, values): + expected = dict( + values, + hostname=host, + identityfile=[expanduser("~/.ssh/id_rsa")], + ) + assert lookup_ssh_host_config(host, self.config) == expected + + def test_fabric_issue_33(self): config = SSHConfig.from_text( """ Host www13.* @@ -163,7 +172,7 @@ Host test got = lookup_ssh_host_config("test", config)["proxycommand"] assert got == expected - def test_host_config_test_negation(self): + def test_negation(self): config = SSHConfig.from_text( """ Host www13.* !*.example.com @@ -183,7 +192,7 @@ Host * expected = {"hostname": host, "port": "8080"} assert lookup_ssh_host_config(host, config) == expected - def test_host_config_test_proxycommand(self): + def test_proxycommand(self): config = SSHConfig.from_text( """ Host proxy-with-equal-divisor-and-space @@ -213,7 +222,7 @@ ProxyCommand foo=bar:%h-%p assert lookup_ssh_host_config(host, config) == values - def test_host_config_test_identityfile(self): + def test_identityfile(self): config = SSHConfig.from_text( """ |