Skip to content

Commit

Permalink
Update test_json_schema.py
Browse files Browse the repository at this point in the history
  • Loading branch information
yezz123 authored Jan 2, 2024
1 parent 2bac2dc commit 1e9555c
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/test_json_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from pydantic_extra_types.mac_address import MacAddress
from pydantic_extra_types.payment import PaymentCardNumber
from pydantic_extra_types.ulid import ULID
from pydantic_extra_types.isbn import ISBN


@pytest.mark.parametrize(
Expand Down Expand Up @@ -185,6 +186,20 @@
'type': 'object',
},
),
(
ISBN,
{
'properties': {
'x': {
'anyOf': [{'type': 'string'}, {'type': 'integer'}],
'title': 'X',
}
},
'required': ['x'],
'title': 'Model',
'type': 'object',
},
),
],
)
def test_json_schema(cls, expected):
Expand Down

0 comments on commit 1e9555c

Please sign in to comment.