Skip to content

Commit feaf009

Browse files
committed
[REVERT] Revert changes to env source nested alias test (separated to another PR)
1 parent 96f67e4 commit feaf009

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/test_settings.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2738,18 +2738,18 @@ class Settings(BaseSettings):
27382738

27392739
def test_case_insensitive_nested_optional(env):
27402740
class NestedSettings(BaseModel):
2741-
FOO: str = Field(..., alias='Foo')
2741+
FOO: str
27422742
BaR: int
27432743

27442744
class Settings(BaseSettings):
27452745
model_config = SettingsConfigDict(env_nested_delimiter='__', case_sensitive=False)
27462746

2747-
nEstEd: Optional[NestedSettings] = Field(..., alias='NesTed')
2747+
nested: Optional[NestedSettings]
27482748

27492749
env.set('nested__FoO', 'string')
27502750
env.set('nested__bar', '123')
27512751
s = Settings()
2752-
assert s.model_dump() == {'nEstEd': {'BaR': 123, 'FOO': 'string'}}
2752+
assert s.model_dump() == {'nested': {'BaR': 123, 'FOO': 'string'}}
27532753

27542754

27552755
def test_case_insensitive_nested_list(env):

0 commit comments

Comments
 (0)