conversations only looks for 404 errors from inbound sms

stops masking some 503s in tests
This commit is contained in:
Leo Hemsted
2018-05-03 15:40:24 +01:00
parent 09a8e863a4
commit 236339435c
3 changed files with 32 additions and 5 deletions

View File

@@ -1886,6 +1886,20 @@ def mock_get_inbound_sms(mocker):
)
@pytest.fixture
def mock_get_inbound_sms_by_id_with_no_messages(mocker):
def _get_inbound_sms_by_id(
service_id,
notification_id
):
raise HTTPError(response=Mock(status_code=404))
return mocker.patch(
'app.service_api_client.get_inbound_sms_by_id',
side_effect=_get_inbound_sms_by_id,
)
@pytest.fixture(scope='function')
def mock_get_most_recent_inbound_sms(mocker):
def _get_most_recent_inbound_sms(