improve: mordernizing validation by migrating pydantic from 1.x to 2.x (#4592)
This commit is contained in:
parent
e8afc416dd
commit
f976740b57
87 changed files with 697 additions and 300 deletions
|
|
@ -17,7 +17,7 @@ def test_default_value():
|
|||
del config[key]
|
||||
with pytest.raises(ValidationError) as e:
|
||||
MilvusConfig(**config)
|
||||
assert e.value.errors()[1]['msg'] == f'config MILVUS_{key.upper()} is required'
|
||||
assert e.value.errors()[0]['msg'] == f'Value error, config MILVUS_{key.upper()} is required'
|
||||
|
||||
config = MilvusConfig(**valid_config)
|
||||
assert config.secure is False
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue