Skip to content

Commit 96d2c1a

Browse files
author
JONEMI21
committed
update uuid schema
1 parent 3fa5d10 commit 96d2c1a

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

tests/test_misc.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,7 @@ def test_undefined():
191191
def test_unicode_error_input_repr() -> None:
192192
"""https://github.com/pydantic/pydantic/issues/6448"""
193193

194-
schema = core_schema.int_schema()
195-
196-
validator = SchemaValidator(schema)
194+
validator = SchemaValidator(core_schema.int_schema())
197195

198196
danger_str = 'ÿ' * 1000
199197
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]"

tests/validators/test_uuid.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,9 @@ def test_uuid_strict(input_value, expected):
150150
],
151151
)
152152
def test_uuid_version(input_value, version, expected):
153-
schema = {'type': 'uuid'}
153+
schema = core_schema.uuid_schema()
154154
if version is not None:
155-
schema['version'] = version
155+
schema = core_schema.uuid_schema(version=version)
156156

157157
v = SchemaValidator(schema)
158158

0 commit comments

Comments
 (0)