Skip to content

Commit 4f8f979

Browse files
authored
Fix Connectors Base Build: CDK tests fail after dependency update (#13652)
1 parent e52b656 commit 4f8f979

File tree

1 file changed

+3
-3
lines changed
  • airbyte-cdk/python/unit_tests/sources/streams/http

1 file changed

+3
-3
lines changed

airbyte-cdk/python/unit_tests/sources/streams/http/test_http.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -476,10 +476,10 @@ def test_default_parse_response_error_message(api_response: dict, expected_messa
476476
assert message == expected_message
477477

478478

479-
def test_default_parse_response_error_message_not_json():
479+
def test_default_parse_response_error_message_not_json(requests_mock):
480480
stream = StubBasicReadHttpStream()
481-
response = MagicMock()
482-
response.json.side_effect = requests.exceptions.JSONDecodeError()
481+
requests_mock.register_uri("GET", "mock://test.com/not_json", text="this is not json")
482+
response = requests.get("mock://test.com/not_json")
483483

484484
message = stream.parse_response_error_message(response)
485485
assert message is None

0 commit comments

Comments
 (0)