File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
unit_tests/sources/streams/http Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -334,11 +334,11 @@ def test_raise_on_http_errors(mocker, error):
334334def test_dns_resolution_error_retry ():
335335 """Test that DNS resolution errors are retried"""
336336 stream = StubBasicReadHttpStream ()
337- error_handler = stream . get_error_handler ()
338- resolution = error_handler . interpret_response ( requests . exceptions . InvalidURL ())
339-
340- assert resolution .response_action == ResponseAction .RETRY
341- assert resolution .failure_type == FailureType .transient_error
337+ with pytest . raises ( InvalidURL ) as exc :
338+ # Test that InvalidURL is treated as transient error
339+ stream . _send_request ( requests . PreparedRequest (), {})
340+ assert exc . value .response_action == ResponseAction .RETRY
341+ assert exc . value .failure_type == FailureType .transient_error
342342
343343
344344class PostHttpStream (StubBasicReadHttpStream ):
You can’t perform that action at this time.
0 commit comments