Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sanderegg committed Oct 25, 2024
1 parent d626e40 commit 3b6ab28
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
8 changes: 8 additions & 0 deletions packages/settings-library/requirements/_base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,23 @@ markdown-it-py==3.0.0
# via rich
mdurl==0.1.2
# via markdown-it-py
orjson==3.10.10
# via
# -c requirements/../../../packages/common-library/requirements/../../../requirements/constraints.txt
# -c requirements/../../../requirements/constraints.txt
# -r requirements/../../../packages/common-library/requirements/_base.in
pydantic==2.9.2
# via
# -c requirements/../../../packages/common-library/requirements/../../../requirements/constraints.txt
# -c requirements/../../../requirements/constraints.txt
# -r requirements/../../../packages/common-library/requirements/_base.in
# -r requirements/_base.in
# pydantic-extra-types
# pydantic-settings
pydantic-core==2.23.4
# via pydantic
pydantic-extra-types==2.9.0
# via -r requirements/../../../packages/common-library/requirements/_base.in
pydantic-settings==2.5.2
# via -r requirements/_base.in
pygments==2.18.0
Expand Down
5 changes: 4 additions & 1 deletion packages/settings-library/tests/test__pydantic_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,9 @@ def test_construct(monkeypatch):
# from __init__
settings_from_init = Settings(
VALUE=1,
VALUE_ALSO_REQUIRED=10,
VALUE_NULLABLE_REQUIRED=None,
VALUE_NULLABLE_REQUIRED_AS_WELL=None,
VALUE_REQUIRED_AS_WELL=32,
)

print(settings_from_init.model_dump_json(exclude_unset=True, indent=1))
Expand All @@ -145,6 +146,8 @@ def test_construct(monkeypatch):
"VALUE": "1",
"VALUE_ALSO_REQUIRED": "10",
"VALUE_NULLABLE_REQUIRED": "null",
"VALUE_NULLABLE_REQUIRED_AS_WELL": "null",
"VALUE_REQUIRED_AS_WELL": "32",
},
) # WARNING: set this env to None would not work w/o ``parse_none`` validator! bug???

Expand Down

0 comments on commit 3b6ab28

Please sign in to comment.