Skip to content

Commit 04c2936

Browse files
committed
fix errors
1 parent 3f7fc28 commit 04c2936

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

tests/validators/test_definitions_recursive.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import pytest
55
from dirty_equals import AnyThing, HasAttributes, IsList, IsPartialDict, IsStr, IsTuple
66

7-
from pydantic_core import SchemaError, SchemaValidator, ValidationError, core_schema
7+
from pydantic_core import SchemaError, SchemaValidator, ValidationError, __version__, core_schema
88

99
from ..conftest import Err, plain_repr
1010
from .test_typed_dict import Cls
@@ -843,7 +843,13 @@ def test_recursive_definitions_schema() -> None:
843843
v.validate_python({'b': [{'a': {}}]})
844844

845845
assert exc_info.value.errors() == [
846-
{'type': 'list_type', 'loc': ('b', 0, 'a'), 'msg': 'Input should be a valid list', 'input': {}}
846+
{
847+
'type': 'list_type',
848+
'loc': ('b', 0, 'a'),
849+
'msg': 'Input should be a valid list',
850+
'input': {},
851+
'url': f'https://errors.pydantic.dev/{__version__}/v/list_type',
852+
}
847853
]
848854

849855

@@ -902,6 +908,6 @@ class Model:
902908
'msg': 'Input should be a dictionary or an instance of Model',
903909
'input': 123,
904910
'ctx': {'dataclass_name': 'Model'},
905-
'url': 'https://errors.pydantic.dev/0.27.1/v/dataclass_type',
911+
'url': f'https://errors.pydantic.dev/{__version__}/v/dataclass_type',
906912
}
907913
]

0 commit comments

Comments
 (0)