Skip to content

Commit fffb812

Browse files
fix cached property
1 parent 3e8ca5d commit fffb812

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

packages/settings-library/tests/test_postgres.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,12 @@ def test_cached_property_dsn(mock_environment: dict):
1717
settings = PostgresSettings()
1818

1919
# all are upper-case
20-
assert all(key == key.upper() for key in settings.dict())
21-
22-
# dsn is computed from the other fields
23-
assert "dsn" not in settings.dict()
24-
25-
# causes cached property to be computed and stored on the instance
20+
assert all(key == key.upper() for key in settings.model_dump())
21+
2622
assert settings.dsn
2723

28-
assert "dsn" in settings.dict()
24+
# dsn is computed from the other fields
25+
assert "dsn" not in settings.model_dump()
2926

3027

3128
def test_dsn_with_query(mock_environment: dict, monkeypatch):

0 commit comments

Comments
 (0)