23
23
24
24
from gitpod import Gitpod , AsyncGitpod , APIResponseValidationError
25
25
from gitpod ._types import Omit
26
+ from gitpod ._utils import maybe_transform
26
27
from gitpod ._models import BaseModel , FinalRequestOptions
27
28
from gitpod ._constants import RAW_RESPONSE_HEADER
28
29
from gitpod ._exceptions import GitpodError , APIStatusError , APITimeoutError , APIResponseValidationError
29
30
from gitpod ._base_client import DEFAULT_TIMEOUT , HTTPX_DEFAULT_TIMEOUT , BaseClient , make_request_options
31
+ from gitpod .types .identity_get_authenticated_identity_params import IdentityGetAuthenticatedIdentityParams
30
32
31
33
from .utils import update_env
32
34
@@ -742,7 +744,7 @@ def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter) -> No
742
744
with pytest .raises (APITimeoutError ):
743
745
self .client .post (
744
746
"/gitpod.v1.IdentityService/GetAuthenticatedIdentity" ,
745
- body = cast (object , dict ()),
747
+ body = cast (object , maybe_transform ( dict (), IdentityGetAuthenticatedIdentityParams )),
746
748
cast_to = httpx .Response ,
747
749
options = {"headers" : {RAW_RESPONSE_HEADER : "stream" }},
748
750
)
@@ -757,7 +759,7 @@ def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter) -> Non
757
759
with pytest .raises (APIStatusError ):
758
760
self .client .post (
759
761
"/gitpod.v1.IdentityService/GetAuthenticatedIdentity" ,
760
- body = cast (object , dict ()),
762
+ body = cast (object , maybe_transform ( dict (), IdentityGetAuthenticatedIdentityParams )),
761
763
cast_to = httpx .Response ,
762
764
options = {"headers" : {RAW_RESPONSE_HEADER : "stream" }},
763
765
)
@@ -1542,7 +1544,7 @@ async def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter)
1542
1544
with pytest .raises (APITimeoutError ):
1543
1545
await self .client .post (
1544
1546
"/gitpod.v1.IdentityService/GetAuthenticatedIdentity" ,
1545
- body = cast (object , dict ()),
1547
+ body = cast (object , maybe_transform ( dict (), IdentityGetAuthenticatedIdentityParams )),
1546
1548
cast_to = httpx .Response ,
1547
1549
options = {"headers" : {RAW_RESPONSE_HEADER : "stream" }},
1548
1550
)
@@ -1557,7 +1559,7 @@ async def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter)
1557
1559
with pytest .raises (APIStatusError ):
1558
1560
await self .client .post (
1559
1561
"/gitpod.v1.IdentityService/GetAuthenticatedIdentity" ,
1560
- body = cast (object , dict ()),
1562
+ body = cast (object , maybe_transform ( dict (), IdentityGetAuthenticatedIdentityParams )),
1561
1563
cast_to = httpx .Response ,
1562
1564
options = {"headers" : {RAW_RESPONSE_HEADER : "stream" }},
1563
1565
)
0 commit comments