diff options
author | Joffrey F <joffrey@docker.com> | 2016-01-28 16:25:23 -0800 |
---|---|---|
committer | Joffrey F <joffrey@docker.com> | 2016-01-28 16:25:23 -0800 |
commit | bb94fe7a8c83b82050c8971464c2838d335b41a4 (patch) | |
tree | 497ca19797bc2bc2740aeb1473e4068db6ed0696 /tests/unit/utils_test.py | |
parent | 446e6d08dd569194a27bb354a184b7d94ecf5e48 (diff) | |
download | docker-py-894-docker_host_env.tar.gz |
Support unspecified protocol in base_url when using TLS894-docker_host_env
(assume HTTPS)
Signed-off-by: Joffrey F <joffrey@docker.com>
Diffstat (limited to 'tests/unit/utils_test.py')
-rw-r--r-- | tests/unit/utils_test.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/unit/utils_test.py b/tests/unit/utils_test.py index 83d2a98..63ea10e 100644 --- a/tests/unit/utils_test.py +++ b/tests/unit/utils_test.py @@ -360,6 +360,11 @@ class ParseHostTest(base.BaseTestCase): assert parse_host(val, 'win32') == tcp_port + def test_parse_host_tls(self): + host_value = 'myhost.docker.net:3348' + expected_result = 'https://myhost.docker.net:3348' + self.assertEqual(parse_host(host_value, None, True), expected_result) + class ParseRepositoryTagTest(base.BaseTestCase): sha = 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855' |