Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
pmateusz committed Nov 11, 2024
1 parent 551b9b1 commit b5c1fb0
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions tests/client/aiohttp/adapter/test_pydantic.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from enum import Enum
from http import HTTPStatus
from http.server import BaseHTTPRequestHandler
from typing import Annotated
from typing import Annotated, Any

import pytest
from aiohttp import ClientSession
Expand Down Expand Up @@ -104,13 +104,8 @@ async def get_response(self) -> ResponseV2:
assert HTTPStatus.OK == exc.response.status


class CheckoutRequest(pydantic.BaseModel):
...


class Request(pydantic.BaseModel):
model_config = pydantic.ConfigDict(ser_json_exclude_unset=True)
data: CheckoutRequest
data: dict[str, Any] | None


@pytest.mark.asyncio()
Expand Down Expand Up @@ -141,7 +136,7 @@ async def post_request(

# WHEN
async with TestClient(ClientSession(http_server.base_url)) as client:
response = await client.post_request(Request.model_construct(data=None))
response = await client.post_request(Request(data=None))

# THEN
assert response.status == HTTPStatus.OK

0 comments on commit b5c1fb0

Please sign in to comment.