This repository was archived by the owner on Jan 13, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -96,6 +96,14 @@ def test_initialization_proxy_with_separate_port(self):
96
96
assert c .proxy_host == 'localhost'
97
97
assert c .proxy_port == 8443
98
98
99
+ def test_initialization_with_ipv6_addresses_proxy_inline_port (self ):
100
+ c = HTTP11Connection ('abcd:dcba::1234' , proxy_host = '[ffff:aaaa::1]:8443' )
101
+
102
+ assert c .host == 'abcd:dcba::1234'
103
+ assert c .port == 80
104
+ assert not c .secure
105
+ assert c .proxy_host == 'ffff:aaaa::1'
106
+ assert c .proxy_port == 8443
99
107
100
108
def test_basic_request (self ):
101
109
c = HTTP11Connection ('httpbin.org' )
Original file line number Diff line number Diff line change @@ -63,6 +63,15 @@ def test_connections_can_parse_proxy_hosts_and_ports(self):
63
63
assert c .proxy_host == 'localhost'
64
64
assert c .proxy_port == 8443
65
65
66
+ def test_connections_can_parse_ipv6_hosts_and_ports (self ):
67
+ c = HTTP20Connection ('abcd:dcba::1234' ,
68
+ proxy_host = '[ffff:aaaa::1]:8443' )
69
+
70
+ assert c .host == 'abcd:dcba::1234'
71
+ assert c .port == 80
72
+ assert c .proxy_host == 'ffff:aaaa::1'
73
+ assert c .proxy_port == 8443
74
+
66
75
def test_putrequest_establishes_new_stream (self ):
67
76
c = HTTP20Connection ("www.google.com" )
68
77
You can’t perform that action at this time.
0 commit comments