We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eb56762 commit 7066ccbCopy full SHA for 7066ccb
tests/test_toml_parser/test_parse_file.py
@@ -197,14 +197,14 @@ def test_env(tmp_path, monkeypatch):
197
198
199
def test_env_in_nested_dict(tmp_path, monkeypatch):
200
- monkeypatch.setenv("SOME_VAR", "blob")
+ monkeypatch.setenv("DATABASE_ENGINE", "django.db.backends.sqlite3")
201
202
- expected = {"SOMETHING": {"MORE": "blob"}}
+ expected = {"DATABASES": {"default": {"ENGINE": "django.db.backends.sqlite3"}}}
203
204
path = tmp_path / "pyproject.toml"
205
path.write_text("""
206
-[tool.django]
207
-SOMETHING = { MORE = { "$env" = "SOME_VAR" } }
+[tool.django.DATABASES]
+default = { ENGINE = { "$env" = "DATABASE_ENGINE", "$default" = "django.db.backends.postgresql" } }
208
""")
209
210
actual = Parser(path).parse_file()
0 commit comments