- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for test_pydanticv2 (0.09 sec)
-
tests/test_datetime_custom_encoder.py
from fastapi import FastAPI from fastapi.testclient import TestClient from pydantic import BaseModel from .utils import needs_pydanticv1, needs_pydanticv2 @needs_pydanticv2 def test_pydanticv2(): from pydantic import field_serializer class ModelWithDatetimeField(BaseModel): dt_field: datetime @field_serializer("dt_field")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 1.6K bytes - Viewed (0) -
tests/test_inherited_custom_class.py
"""Spoof a missing __dict__ by raising TypeError, this is how asyncpg.pgroto.pgproto.UUID behaves""" raise TypeError("vars() argument must have __dict__ attribute") @needs_pydanticv2 def test_pydanticv2(): from pydantic import field_serializer app = FastAPI() @app.get("/fast_uuid") def return_fast_uuid(): asyncpg_uuid = MyUuid("a10ff360-3b1e-4984-a26f-d3ab460bdb51")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Aug 17 04:13:50 UTC 2024 - 3K bytes - Viewed (0)