Repository navigation
Commit c2f23df
fix(test): correct Settings() alias usage and mypy union-attr in migration test
Adding a real Postgres service to CI (previous commit) surfaced a real bug:
test_unconfigured_dependencies_report_degraded constructed
Settings(database_url=None, qdrant_url=None, ...) using the Python attribute
names, but Settings has no populate_by_name=True and its fields are aliased
(alias="DATABASE_URL" etc.) with extra="ignore" -- so those two kwargs were
silently dropped as unrecognized extras, and the settings fell through to
the real DATABASE_URL env var instead of the intended None override. This
was invisible before because CI had no Postgres server either way, so the
env-var fallback also produced "down" by coincidence. Every other Settings(...)
construction in the test suite already uses the alias spelling
(DATABASE_URL=, JWT_SECRET=, ...); fixed this one call site to match.
Also fixed a new mypy union-attr error from the prior commit's
_exec_script helper: AsyncConnection.get_raw_connection()'s
driver_connection is typed Any | None.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>1 parent c93db0e commit c2f23df
2 files changed
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
354 | 354 | | |
355 | 355 | | |
356 | 356 | | |
357 | | - | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
358 | 360 | | |
359 | 361 | | |
360 | 362 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
153 | | - | |
| 153 | + | |
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
| |||
0 commit comments