Fixes #1422: ipv6 addr contains colons, so we split only by the first char.

Signed-off-by: Clemens Gutweiler <cg@vioma.de>
This commit is contained in:
Clemens Gutweiler 2016-01-07 17:59:51 +01:00
commit ce9f2681a2
2 changed files with 5 additions and 3 deletions

View file

@ -16,11 +16,13 @@ def test_parse_extra_hosts_list():
assert parse_extra_hosts([
"www.example.com: 192.168.0.17",
"static.example.com:192.168.0.19",
"api.example.com: 192.168.0.18"
"api.example.com: 192.168.0.18",
"v6.example.com: ::1"
]) == {
'www.example.com': '192.168.0.17',
'static.example.com': '192.168.0.19',
'api.example.com': '192.168.0.18'
'api.example.com': '192.168.0.18',
'v6.example.com': '::1'
}