@@ -93,6 +93,7 @@ async def open(
9393 http_version : str = "1.1" ,
9494 scope_base : Optional [dict ] = None ,
9595 auth : Optional [Union [Authorization , Tuple [str , str ]]] = None ,
96+ subdomain : Optional [str ] = None ,
9697 ) -> Response :
9798 self .push_promises = []
9899 response = await self ._make_request (
@@ -109,6 +110,7 @@ async def open(
109110 http_version ,
110111 scope_base ,
111112 auth ,
113+ subdomain ,
112114 )
113115 if follow_redirects :
114116 while response .status_code >= 300 and response .status_code <= 399 :
@@ -131,6 +133,7 @@ async def open(
131133 http_version ,
132134 scope_base ,
133135 auth ,
136+ subdomain ,
134137 )
135138 if self .preserve_context :
136139 _cv_request .set (self .app ._preserved_context ) # type: ignore
@@ -148,13 +151,15 @@ def request(
148151 http_version : str = "1.1" ,
149152 scope_base : Optional [dict ] = None ,
150153 auth : Optional [Union [Authorization , Tuple [str , str ]]] = None ,
154+ subdomain : Optional [str ] = None ,
151155 ) -> TestHTTPConnectionProtocol :
152156 headers , path , query_string_bytes = make_test_headers_path_and_query_string (
153157 self .app ,
154158 path ,
155159 headers ,
156160 query_string ,
157161 auth ,
162+ subdomain ,
158163 )
159164 if self .cookie_jar is not None :
160165 for cookie in self .cookie_jar :
@@ -185,13 +190,15 @@ def websocket(
185190 http_version : str = "1.1" ,
186191 scope_base : Optional [dict ] = None ,
187192 auth : Optional [Union [Authorization , Tuple [str , str ]]] = None ,
193+ subdomain : Optional [str ] = None ,
188194 ) -> TestWebsocketConnectionProtocol :
189195 headers , path , query_string_bytes = make_test_headers_path_and_query_string (
190196 self .app ,
191197 path ,
192198 headers ,
193199 query_string ,
194200 auth ,
201+ subdomain ,
195202 )
196203 if self .cookie_jar is not None :
197204 for cookie in self .cookie_jar :
@@ -409,9 +416,10 @@ async def _make_request(
409416 http_version : str ,
410417 scope_base : Optional [dict ],
411418 auth : Optional [Union [Authorization , Tuple [str , str ]]] = None ,
419+ subdomain : Optional [str ] = None ,
412420 ) -> Response :
413421 headers , path , query_string_bytes = make_test_headers_path_and_query_string (
414- self .app , path , headers , query_string , auth
422+ self .app , path , headers , query_string , auth , subdomain
415423 )
416424 request_data , body_headers = make_test_body_with_headers (
417425 data = data , form = form , files = files , json = json , app = self .app
0 commit comments