Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions src/mock_vws/_query_validators/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -604,18 +604,16 @@ 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,
localtime=False,
usegmt=True,
)
self.headers = {
"Content-Type": "application/json",
"Content-Type": "text/plain;charset=utf-8",
"Connection": "keep-alive",
"Server": "nginx",
"Date": date,
Expand Down
12 changes: 6 additions & 6 deletions tests/mock_vws/test_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -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/*",
Expand Down Expand Up @@ -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",
Expand Down