Skip to content
This repository has been archived by the owner on Mar 12, 2024. It is now read-only.

Commit

Permalink
fix: ...actually use correct mocked error
Browse files Browse the repository at this point in the history
  • Loading branch information
srwang committed Jul 12, 2023
1 parent 4c4e774 commit 257d224
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tubular/tests/test_segment_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,11 +212,11 @@ def test_send_event_to_segment_error(setup_regulation_api, caplog): # pylint: di
Test simple error case
"""
mock_post, segment = setup_regulation_api
mock_post.return_value = FakeErrorResponse()
mock_post.return_value = Fake400Response()

with pytest.raises(Exception):
segment.send_event_to_segment('test.event')

assert mock_post.call_count == 4
assert "Bad request" in caplog.text
assert "400 Bad request" in caplog.text

0 comments on commit 257d224

Please sign in to comment.