Skip to content

Commit 454e9cc

Browse files
Fix test coverage for boundary error handling (#3052)
Removed unnecessary guard condition that was always true after commit d7ea250 changed the */* boundary error from INTERNAL_SERVER_ERROR to BAD_REQUEST. Updated stale docstring in test_no_boundary that still referenced INTERNAL_SERVER_ERROR. Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
1 parent ae4172e commit 454e9cc

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

tests/mock_vws/test_query.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -254,8 +254,7 @@ def test_incorrect_no_boundary(
254254
content=requests_response.content,
255255
)
256256

257-
if resp_status_code != HTTPStatus.INTERNAL_SERVER_ERROR:
258-
handle_server_errors(response=vws_response)
257+
handle_server_errors(response=vws_response)
259258

260259
repl = "Powered by Jetty://"
261260
sub = _JETTY_VERSION_RE.sub
@@ -357,10 +356,7 @@ def test_no_boundary(
357356
vuforia_database: CloudDatabase,
358357
content_type: str,
359358
) -> None:
360-
"""
361-
If no boundary is given, an ``INTERNAL_SERVER_ERROR`` is
362-
returned.
363-
"""
359+
"""If no boundary is given, a ``BAD_REQUEST`` is returned."""
364360
image_content = high_quality_image.getvalue()
365361
date = rfc_1123_date()
366362
request_path = "/v1/query"

0 commit comments

Comments
 (0)