Skip to content

Commit 2a3c240

Browse files
committed
test: Regen e2e tests
1 parent c3839bb commit 2a3c240

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

end_to_end_tests/golden-record/my_test_api_client/api/tests/callback_test.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from http import HTTPStatus
12
from typing import Any, Dict, Optional, Union, cast
23

34
import httpx
@@ -31,10 +32,10 @@ def _get_kwargs(
3132

3233

3334
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, HTTPValidationError]]:
34-
if response.status_code == 200:
35+
if response.status_code == HTTPStatus.OK:
3536
response_200 = cast(Any, response.json())
3637
return response_200
37-
if response.status_code == 422:
38+
if response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY:
3839
response_422 = HTTPValidationError.from_dict(response.json())
3940

4041
return response_422
@@ -43,7 +44,7 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, HTTPVali
4344

4445
def _build_response(*, response: httpx.Response) -> Response[Union[Any, HTTPValidationError]]:
4546
return Response(
46-
status_code=response.status_code,
47+
status_code=HTTPStatus(response.status_code),
4748
content=response.content,
4849
headers=response.headers,
4950
parsed=_parse_response(response=response),

end_to_end_tests/golden-record/my_test_api_client/api/tests/post_form_data_inline.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from http import HTTPStatus
12
from typing import Any, Dict
23

34
import httpx
@@ -29,7 +30,7 @@ def _get_kwargs(
2930

3031
def _build_response(*, response: httpx.Response) -> Response[Any]:
3132
return Response(
32-
status_code=response.status_code,
33+
status_code=HTTPStatus(response.status_code),
3334
content=response.content,
3435
headers=response.headers,
3536
parsed=None,

0 commit comments

Comments
 (0)