|
55 | 55 | text="""\ |
56 | 56 | <html> |
57 | 57 | <head> |
58 | | - <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> |
| 58 | + <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/> |
59 | 59 | <title>Error 400 Bad Request</title> |
60 | 60 | </head> |
61 | | - <body><h2>HTTP ERROR 400 Bad Request</h2> |
| 61 | + <body> |
| 62 | + <h2>HTTP ERROR 400 Bad Request</h2> |
62 | 63 | <table> |
63 | | - <tr><th>URI:</th><td>/v1/query</td></tr> |
| 64 | + <tr><th>URI:</th><td>http://cloudreco.vuforia.com/v1/query</td></tr> |
64 | 65 | <tr><th>STATUS:</th><td>400</td></tr> |
65 | 66 | <tr><th>MESSAGE:</th><td>Bad Request</td></tr> |
66 | | - <tr><th>SERVLET:</th><td>Resteasy</td></tr> |
67 | 67 | </table> |
68 | | - <hr><a href="https://eclipse.org/jetty">Powered by Jetty:// 9.4.43.v20210629</a><hr/> |
| 68 | + <hr/><a href="https://jetty.org/">Powered by Jetty:// 12.0.16</a><hr/> |
69 | 69 |
|
70 | 70 | </body> |
71 | 71 | </html> |
72 | | - """, # noqa: E501 |
| 72 | + """, |
73 | 73 | ) |
74 | 74 |
|
75 | 75 | _NGINX_REQUEST_ENTITY_TOO_LARGE_ERROR = textwrap.dedent( |
@@ -177,13 +177,10 @@ class TestContentType: |
177 | 177 | ), |
178 | 178 | ( |
179 | 179 | "*/*", |
180 | | - HTTPStatus.BAD_REQUEST, |
181 | | - "text/html;charset=utf-8", |
| 180 | + HTTPStatus.INTERNAL_SERVER_ERROR, |
| 181 | + "application/json", |
182 | 182 | None, |
183 | | - ( |
184 | | - "java.io.IOException: RESTEASY007550: Unable to get " |
185 | | - "boundary for multipart" |
186 | | - ), |
| 183 | + "RESTEASY007550: Unable to get boundary for multipart", |
187 | 184 | ), |
188 | 185 | ( |
189 | 186 | "text/*", |
@@ -255,7 +252,9 @@ def test_incorrect_no_boundary( |
255 | 252 | request_body=requests_response.request.body, |
256 | 253 | tell_position=requests_response.raw.tell(), |
257 | 254 | ) |
258 | | - handle_server_errors(response=vws_response) |
| 255 | + |
| 256 | + if resp_status_code != HTTPStatus.INTERNAL_SERVER_ERROR: |
| 257 | + handle_server_errors(response=vws_response) |
259 | 258 |
|
260 | 259 | assert requests_response.text == resp_text |
261 | 260 | assert_vwq_failure( |
@@ -349,7 +348,7 @@ def test_no_boundary( |
349 | 348 | content_type: str, |
350 | 349 | ) -> None: |
351 | 350 | """ |
352 | | - If no boundary is given, a ``BAD_REQUEST`` is returned. |
| 351 | + If no boundary is given, an ``INTERNAL_SERVER_ERROR`` is returned. |
353 | 352 | """ |
354 | 353 | image_content = high_quality_image.getvalue() |
355 | 354 | date = rfc_1123_date() |
@@ -393,17 +392,12 @@ def test_no_boundary( |
393 | 392 | request_body=requests_response.request.body, |
394 | 393 | tell_position=requests_response.raw.tell(), |
395 | 394 | ) |
396 | | - handle_server_errors(response=vws_response) |
397 | | - |
398 | | - expected_text = ( |
399 | | - "java.io.IOException: RESTEASY007550: " |
400 | | - "Unable to get boundary for multipart" |
401 | | - ) |
| 395 | + expected_text = "RESTEASY007550: Unable to get boundary for multipart" |
402 | 396 | assert requests_response.text == expected_text |
403 | 397 | assert_vwq_failure( |
404 | 398 | response=vws_response, |
405 | | - status_code=HTTPStatus.BAD_REQUEST, |
406 | | - content_type="text/html;charset=utf-8", |
| 399 | + status_code=HTTPStatus.INTERNAL_SERVER_ERROR, |
| 400 | + content_type="application/json", |
407 | 401 | cache_control=None, |
408 | 402 | www_authenticate=None, |
409 | 403 | connection="keep-alive", |
@@ -1155,8 +1149,8 @@ def test_invalid_value( |
1155 | 1149 | response = _query(vuforia_database=vuforia_database, body=body) |
1156 | 1150 |
|
1157 | 1151 | expected_text = ( |
1158 | | - f"Invalid value '{include_target_data}' in form data " |
1159 | | - "part 'include_target_data'. " |
| 1152 | + f"Invalid value '{str(object=include_target_data).lower()}' in " |
| 1153 | + "form data part 'include_target_data'. " |
1160 | 1154 | "Expecting one of the (unquoted) string values 'all', 'none' or " |
1161 | 1155 | "'top'." |
1162 | 1156 | ) |
|
0 commit comments