mirror of
https://github.com/fastapi/sqlmodel.git
synced 2025-10-28 12:16:39 +08:00
✨ Add support for Pydantic v2 (while keeping support for v1 if v2 is not available), including initial work by AntonDeMeester (#722)
Co-authored-by: Mohamed Farahat <farahats9@yahoo.com> Co-authored-by: Stefan Borer <stefan.borer@gmail.com> Co-authored-by: Peter Landry <peter.landry@gmail.com> Co-authored-by: Anton De Meester <antondemeester+github@gmail.com>
This commit is contained in:
committed by
GitHub
parent
5b733b348d
commit
fa2f178b8a
@ -6,7 +6,7 @@ from sqlmodel import Field, Relationship, SQLModel
|
||||
|
||||
|
||||
def test_sa_relationship_no_args() -> None:
|
||||
with pytest.raises(RuntimeError):
|
||||
with pytest.raises(RuntimeError): # pragma: no cover
|
||||
|
||||
class Team(SQLModel, table=True):
|
||||
id: Optional[int] = Field(default=None, primary_key=True)
|
||||
@ -30,7 +30,7 @@ def test_sa_relationship_no_args() -> None:
|
||||
|
||||
|
||||
def test_sa_relationship_no_kwargs() -> None:
|
||||
with pytest.raises(RuntimeError):
|
||||
with pytest.raises(RuntimeError): # pragma: no cover
|
||||
|
||||
class Team(SQLModel, table=True):
|
||||
id: Optional[int] = Field(default=None, primary_key=True)
|
||||
|
||||
Reference in New Issue
Block a user