diff options
author | mangano-ito <47137677+mangano-ito@users.noreply.github.com> | 2022-01-18 16:56:48 +0900 |
---|---|---|
committer | mangano-ito <47137677+mangano-ito@users.noreply.github.com> | 2022-02-09 21:29:24 +0900 |
commit | 04214eaf89001fe35eb29137228cbefaf30f43d5 (patch) | |
tree | 12de93d6fe1d91c0b52407f373012344636352b5 /tests | |
parent | 6b07cb2d21537663baade59ebe03e97d16524af8 (diff) |
test hosts with no port specified
Diffstat (limited to 'tests')
-rw-r--r-- | tests/client/test_options.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/client/test_options.py b/tests/client/test_options.py index 6f86a8a..1b5f4a7 100644 --- a/tests/client/test_options.py +++ b/tests/client/test_options.py @@ -105,3 +105,11 @@ def test_parse_subnetport_ip6_with_mask_and_port(): def test_convert_arg_line_to_args_skips_comments(): parser = sshuttle.options.MyArgumentParser() assert parser.convert_arg_line_to_args("# whatever something") == [] + + +def test_parse_subnetport_host(): + assert set(sshuttle.options.parse_subnetport('example.com')) \ + == set([ + (socket.AF_INET6, '2606:2800:220:1:248:1893:25c8:1946', 128, 0, 0), + (socket.AF_INET, '93.184.216.34', 32, 0, 0), + ]) |