diff options
author | Joffrey F <joffrey@docker.com> | 2016-10-12 16:06:43 -0700 |
---|---|---|
committer | Joffrey F <joffrey@docker.com> | 2016-10-12 16:06:43 -0700 |
commit | 05f1060824e6567629351618bf1989df5826fda7 (patch) | |
tree | cb519d67adc8c16102ad25c29670d0e3f9570ffa /tests/unit/utils_test.py | |
parent | 008730c670afb2f88c7db308901586fb24f1a60c (diff) | |
download | docker-py-base_url_trailing_slash.tar.gz |
Remove trailing slashes in result of utils.parse_hostbase_url_trailing_slash
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 2a2759d..059c82d 100644 --- a/tests/unit/utils_test.py +++ b/tests/unit/utils_test.py @@ -522,6 +522,11 @@ class ParseHostTest(base.BaseTestCase): expected_result = 'https://myhost.docker.net:3348' assert parse_host(host_value, tls=True) == expected_result + def test_parse_host_trailing_slash(self): + host_value = 'tcp://myhost.docker.net:2376/' + expected_result = 'http://myhost.docker.net:2376' + assert parse_host(host_value) == expected_result + class ParseRepositoryTagTest(base.BaseTestCase): sha = 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855' |