Skip to content

Commit

Permalink
should have known better, union syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
sydney-runkle committed Apr 14, 2024
1 parent a5cf380 commit 6673dc5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -4465,7 +4465,7 @@ class Foobar(BaseModel):

def test_secret_union_serializable() -> None:
class Base(BaseModel):
x: Secret[int] | Secret[str]
x: Union[Secret[int], Secret[str]]

model = Base(x=1)
assert model.model_dump() == {'x': Secret[int](1)}
Expand Down

0 comments on commit 6673dc5

Please sign in to comment.