Skip to content

Commit

Permalink
Fix Connectors Base Build: CDK tests fail after dependency update (#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
pedroslopez authored Jun 9, 2022
1 parent e52b656 commit 4f8f979
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -476,10 +476,10 @@ def test_default_parse_response_error_message(api_response: dict, expected_messa
assert message == expected_message


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

message = stream.parse_response_error_message(response)
assert message is None
Expand Down

0 comments on commit 4f8f979

Please sign in to comment.