Skip to content

Commit

Permalink
update uuid schema
Browse files Browse the repository at this point in the history
  • Loading branch information
JONEMI21 committed Feb 10, 2025
1 parent 3fa5d10 commit 96d2c1a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions tests/test_misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,7 @@ def test_undefined():
def test_unicode_error_input_repr() -> None:
"""https://github.com/pydantic/pydantic/issues/6448"""

schema = core_schema.int_schema()

validator = SchemaValidator(schema)
validator = SchemaValidator(core_schema.int_schema())

danger_str = 'ÿ' * 1000
expected = "1 validation error for int\n Input should be a valid integer, unable to parse string as an integer [type=int_parsing, input_value='ÿÿÿÿÿÿÿÿÿÿÿÿ...ÿÿÿÿÿÿÿÿÿÿÿ', input_type=str]"
Expand Down
4 changes: 2 additions & 2 deletions tests/validators/test_uuid.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,9 @@ def test_uuid_strict(input_value, expected):
],
)
def test_uuid_version(input_value, version, expected):
schema = {'type': 'uuid'}
schema = core_schema.uuid_schema()
if version is not None:
schema['version'] = version
schema = core_schema.uuid_schema(version=version)

v = SchemaValidator(schema)

Expand Down

0 comments on commit 96d2c1a

Please sign in to comment.