@@ -1213,8 +1213,8 @@ def test_read_headers_out_of_order(self):
12131213 r1 = c .request ('GET' , '/a' )
12141214 r3 = c .request ('GET' , '/b' )
12151215
1216- assert c .getresponse (r3 ).headers == HTTPHeaderMap ([('content-type' , 'baz/qux' )])
1217- assert c .getresponse (r1 ).headers == HTTPHeaderMap ([('content-type' , 'foo/bar' )])
1216+ assert c .get_response (r3 ).headers == HTTPHeaderMap ([('content-type' , 'baz/qux' )])
1217+ assert c .get_response (r1 ).headers == HTTPHeaderMap ([('content-type' , 'foo/bar' )])
12181218
12191219 def test_headers_with_continuation (self ):
12201220 e = Encoder ()
@@ -1233,7 +1233,7 @@ def test_headers_with_continuation(self):
12331233 c ._sock = sock
12341234 r = c .request ('GET' , '/' )
12351235
1236- assert set (c .getresponse (r ).headers .iter_raw ()) == set ([(b'content-type' , b'foo/bar' ), (b'content-length' , b'0' )])
1236+ assert set (c .get_response (r ).headers .iter_raw ()) == set ([(b'content-type' , b'foo/bar' ), (b'content-length' , b'0' )])
12371237
12381238 def test_receive_unexpected_frame (self ):
12391239 # RST_STREAM frames are never defined on connections, so send one of
@@ -1275,7 +1275,7 @@ def test_window_increments_appropriately(self):
12751275 c .window_manager .window_size = 1000
12761276 c .window_manager .initial_window_size = 1000
12771277 c .request ('GET' , '/' )
1278- resp = c .getresponse ()
1278+ resp = c .get_response ()
12791279 resp .read ()
12801280
12811281 queue = list (map (decode_frame , map (memoryview , sock .queue )))
@@ -1371,12 +1371,12 @@ def request(self):
13711371 self .conn .request ('GET' , '/' )
13721372
13731373 def assert_response (self ):
1374- self .response = self .conn .getresponse ()
1374+ self .response = self .conn .get_response ()
13751375 assert self .response .status == 200
13761376 assert dict (self .response .headers ) == {b'content-type' : [b'text/html' ]}
13771377
13781378 def assert_pushes (self ):
1379- self .pushes = list (self .conn .getpushes ())
1379+ self .pushes = list (self .conn .get_pushes ())
13801380 assert len (self .pushes ) == 1
13811381 assert self .pushes [0 ].method == b'GET'
13821382 assert self .pushes [0 ].scheme == b'https'
@@ -1386,7 +1386,7 @@ def assert_pushes(self):
13861386 assert dict (self .pushes [0 ].request_headers ) == expected_headers
13871387
13881388 def assert_push_response (self ):
1389- push_response = self .pushes [0 ].getresponse ()
1389+ push_response = self .pushes [0 ].get_response ()
13901390 assert push_response .status == 200
13911391 assert dict (push_response .headers ) == {b'content-type' : [b'application/javascript' ]}
13921392 assert push_response .read () == b'bar'
@@ -1399,7 +1399,7 @@ def test_promise_before_headers(self):
13991399 self .add_data_frame (2 , b'bar' , end_stream = True )
14001400
14011401 self .request ()
1402- assert len (list (self .conn .getpushes ())) == 0
1402+ assert len (list (self .conn .get_pushes ())) == 0
14031403 self .assert_response ()
14041404 self .assert_pushes ()
14051405 assert self .response .read () == b'foo'
@@ -1413,9 +1413,9 @@ def test_promise_after_headers(self):
14131413 self .add_data_frame (2 , b'bar' , end_stream = True )
14141414
14151415 self .request ()
1416- assert len (list (self .conn .getpushes ())) == 0
1416+ assert len (list (self .conn .get_pushes ())) == 0
14171417 self .assert_response ()
1418- assert len (list (self .conn .getpushes ())) == 0
1418+ assert len (list (self .conn .get_pushes ())) == 0
14191419 assert self .response .read () == b'foo'
14201420 self .assert_pushes ()
14211421 self .assert_push_response ()
@@ -1429,9 +1429,9 @@ def test_promise_after_data(self):
14291429 self .add_data_frame (2 , b'bar' , end_stream = True )
14301430
14311431 self .request ()
1432- assert len (list (self .conn .getpushes ())) == 0
1432+ assert len (list (self .conn .get_pushes ())) == 0
14331433 self .assert_response ()
1434- assert len (list (self .conn .getpushes ())) == 0
1434+ assert len (list (self .conn .get_pushes ())) == 0
14351435 assert self .response .read () == b'foo'
14361436 self .assert_pushes ()
14371437 self .assert_push_response ()
@@ -1447,13 +1447,13 @@ def test_capture_all_promises(self):
14471447 self .add_data_frame (2 , b'one' , end_stream = True )
14481448
14491449 self .request ()
1450- assert len (list (self .conn .getpushes ())) == 0
1451- pushes = list (self .conn .getpushes (capture_all = True ))
1450+ assert len (list (self .conn .get_pushes ())) == 0
1451+ pushes = list (self .conn .get_pushes (capture_all = True ))
14521452 assert len (pushes ) == 2
14531453 assert pushes [0 ].path == b'/one'
14541454 assert pushes [1 ].path == b'/two'
1455- assert pushes [0 ].getresponse ().read () == b'one'
1456- assert pushes [1 ].getresponse ().read () == b'two'
1455+ assert pushes [0 ].get_response ().read () == b'one'
1456+ assert pushes [1 ].get_response ().read () == b'two'
14571457 self .assert_response ()
14581458 assert self .response .read () == b'foo'
14591459
@@ -1462,8 +1462,8 @@ def test_cancel_push(self):
14621462 self .add_headers_frame (1 , [(':status' , '200' ), ('content-type' , 'text/html' )])
14631463
14641464 self .request ()
1465- self .conn .getresponse ()
1466- list (self .conn .getpushes ())[0 ].cancel ()
1465+ self .conn .get_response ()
1466+ list (self .conn .get_pushes ())[0 ].cancel ()
14671467
14681468 f = RstStreamFrame (2 )
14691469 f .error_code = 8
@@ -1475,7 +1475,7 @@ def test_reset_pushed_streams_when_push_disabled(self):
14751475
14761476 self .request ()
14771477 self .conn ._enable_push = False
1478- self .conn .getresponse ()
1478+ self .conn .get_response ()
14791479
14801480 f = RstStreamFrame (2 )
14811481 f .error_code = 7
0 commit comments