diff --git a/src/mock_vws/_query_validators/exceptions.py b/src/mock_vws/_query_validators/exceptions.py index 6417595f4..bb830651b 100644 --- a/src/mock_vws/_query_validators/exceptions.py +++ b/src/mock_vws/_query_validators/exceptions.py @@ -604,10 +604,8 @@ def __init__(self) -> None: raised. """ super().__init__() - self.status_code = HTTPStatus.INTERNAL_SERVER_ERROR - self.response_text = ( - "RESTEASY007550: Unable to get boundary for multipart" - ) + self.status_code = HTTPStatus.BAD_REQUEST + self.response_text = "Unable to get boundary for multipart" date = email.utils.formatdate( timeval=None, @@ -615,7 +613,7 @@ def __init__(self) -> None: usegmt=True, ) self.headers = { - "Content-Type": "application/json", + "Content-Type": "text/plain;charset=utf-8", "Connection": "keep-alive", "Server": "nginx", "Date": date, diff --git a/tests/mock_vws/test_query.py b/tests/mock_vws/test_query.py index 0a1102643..aa1461abe 100644 --- a/tests/mock_vws/test_query.py +++ b/tests/mock_vws/test_query.py @@ -179,10 +179,10 @@ class TestContentType: ), ( "*/*", - HTTPStatus.INTERNAL_SERVER_ERROR, - "application/json", + HTTPStatus.BAD_REQUEST, + "text/plain;charset=utf-8", None, - "RESTEASY007550: Unable to get boundary for multipart", + "Unable to get boundary for multipart", ), ( "text/*", @@ -404,12 +404,12 @@ def test_no_boundary( tell_position=requests_response.raw.tell(), content=requests_response.content, ) - expected_text = "RESTEASY007550: Unable to get boundary for multipart" + expected_text = "Unable to get boundary for multipart" assert requests_response.text == expected_text assert_vwq_failure( response=vws_response, - status_code=HTTPStatus.INTERNAL_SERVER_ERROR, - content_type="application/json", + status_code=HTTPStatus.BAD_REQUEST, + content_type="text/plain;charset=utf-8", cache_control=None, www_authenticate=None, connection="keep-alive",