@@ -486,7 +486,8 @@ def test_paths_tags(httpx_mock, with_paths_tags):
486486
487487
488488def test_paths_response_status_pattern_default (httpx_mock , with_paths_response_status_pattern_default ):
489- api = OpenAPI ("/" , with_paths_response_status_pattern_default , session_factory = httpx .Client , raise_on_error = False )
489+ api = OpenAPI ("/" , with_paths_response_status_pattern_default , session_factory = httpx .Client )
490+ api .raise_on_http_status = []
490491
491492 httpx_mock .add_response (headers = {"Content-Type" : "application/json" }, status_code = 201 , json = "created" )
492493 r = api ._ .test ()
@@ -511,7 +512,7 @@ def test_paths_response_status_pattern_default(httpx_mock, with_paths_response_s
511512 api ._ .test ()
512513
513514
514- def test_paths_response_error (httpx_mock , with_paths_response_error_vXX ):
515+ def test_paths_response_error (mocker , httpx_mock , with_paths_response_error_vXX ):
515516 from aiopenapi3 import ResponseSchemaError , ContentTypeError , HTTPStatusError , ResponseDecodingError
516517
517518 api = OpenAPI ("/" , with_paths_response_error_vXX , session_factory = httpx .Client )
@@ -545,7 +546,7 @@ def test_paths_response_error(httpx_mock, with_paths_response_error_vXX):
545546 api ._ .test ()
546547
547548 httpx_mock .add_response (headers = {"Content-Type" : "application/json" , "X-required" : "1" }, status_code = 437 , json = "ok" )
548- api . _raise_on_error = False
549+ mocker . patch . object ( api , "raise_on_http_status" , return_value = [], autospec = True )
549550 api ._ .test ()
550551
551552
0 commit comments