def METHOD_NAME(status_code):
    """This test checks that "success" codes which are not 200 still retry."""
    with mock.patch(REQUEST_MODULE_PATH + ".get") as mock_get:
        mock_get.return_value = create_mock_response(status_code)
        with mock.patch("time.sleep", return_value=None):
            with pytest.raises(InterfaceError) as ex:
                _ = result_batch._download()
            error = ex.value
            assert error.errno == ER_FAILED_TO_REQUEST
            assert error.sqlstate == SQLSTATE_CONNECTION_WAS_NOT_ESTABLISHED
        assert mock_get.call_count == MAX_DOWNLOAD_RETRY