Skip to content

Commit 59fc14a

Browse files
committed
update beronet tests to account for unexpected 201+ codes
1 parent ed86463 commit 59fc14a

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

tests/plugins/test_plugin_beronet.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ def test_outgoing_cdr(requests_mock, mock_plugin: beronet.BeroNet, disable_sleep
7878
assert record.duration # Assert that we have a duration
7979

8080

81-
def test_wrong_status_code_no_error(requests_mock, mock_plugin: beronet.BeroNet, disable_sleep):
81+
@pytest.mark.parametrize("status_code", [204, 400, 500])
82+
def test_wrong_status_code_no_error(requests_mock, mock_plugin: beronet.BeroNet, disable_sleep, status_code):
8283
"""Test that the wrong status error gets caught and not cause an error."""
83-
requests_mock.get(mock_plugin.api_url, status_code=400)
84+
requests_mock.get(mock_plugin.api_url, status_code=status_code)
8485
assert mock_plugin.run() # This should return True if error was caught

0 commit comments

Comments
 (0)