Skip to content

Commit

Permalink
Call side_effect on raise_for_status
Browse files Browse the repository at this point in the history
  • Loading branch information
merc1er committed Jun 10, 2024
1 parent b64d220 commit 9252b3a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_rates.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ def test_get_rate_api_failure(self, mock_requests_get):

@patch("tipbot.rates.requests.get")
def test_get_rate_http_error(self, mock_requests_get):
mock_requests_get.side_effect = requests.exceptions.HTTPError
mock_response = MagicMock()
mock_response.raise_for_status.side_effect = requests.exceptions.HTTPError
mock_response.text = "Error message"
mock_requests_get.return_value = mock_response
mock_update = MagicMock()
Expand Down

0 comments on commit 9252b3a

Please sign in to comment.