Skip to content

Commit 04a438a

Browse files
author
Andrei Neagu
committed
fixed broken test
1 parent 2e3f527 commit 04a438a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/settings-library/tests/test__pydantic_settings.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"""
1414

1515
from common_library.pydantic_fields_extension import is_nullable
16-
from pydantic import BaseSettings, ValidationInfo, field_validator
16+
from pydantic import ValidationInfo, field_validator
1717
from pydantic.fields import PydanticUndefined
1818
from pydantic_settings import BaseSettings
1919
from pytest_simcore.helpers.monkeypatch_envs import setenvs_from_dict
@@ -135,17 +135,17 @@ def test_construct(monkeypatch):
135135
VALUE_NULLABLE_REQUIRED=None,
136136
VALUE_NULLABLE_REQUIRED_AS_WELL=None,
137137
VALUE_REQUIRED_AS_WELL=10,
138-
VALUE_ALSO_REQUIRED=10,
139138
)
140139
print(settings_from_init.model_dump_json(exclude_unset=True, indent=1))
141140

142141
# from env vars
143142
setenvs_from_dict(
144143
monkeypatch,
145144
{
146-
"VALUE": "1",
147-
"VALUE_ALSO_REQUIRED": "10",
145+
"VALUE_NULLABLE_REQUIRED_AS_WELL": "null",
148146
"VALUE_NULLABLE_REQUIRED": "null",
147+
"VALUE_REQUIRED_AS_WELL": "10",
148+
"VALUE": "1",
149149
},
150150
) # WARNING: set this env to None would not work w/o ``parse_none`` validator! bug???
151151

0 commit comments

Comments
 (0)