| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Port the regression test from litestar-sqlalchemy-template#32. The production bug fixed there (api_bootstrapper_config reading the module -global `settings` singleton instead of `self`) is already absent here, but there was no test guarding against it being reintroduced. The test constructs a non-singleton Settings instance and asserts its api_bootstrapper_config reflects that instance, not the global. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
| Back | FazBrowse Home | New Git URL |
Context
Ports the regression test from litestar-sqlalchemy-template#32.
That PR fixed a bug where Settings.api_bootstrapper_config built its config from the module-global settings singleton instead of self, so any non-singleton Settings instance (or access during the singleton's own construction) silently produced the singleton's values.
State in this repo
The production code here already reads self.* — the bug is absent. What was missing was a test guarding against it being reintroduced. This PR adds only that test.
Test
tests/test_settings.py constructs Settings(service_name="custom-service", service_version="9.9.9") and asserts api_bootstrapper_config reflects the instance rather than the global. Passes GREEN against the current (correct) code; would fail if the self.* reads ever regressed to settings.*.
ruff format --check, ruff check --no-fix, and ty check all pass on the new file.
🤖 Generated with Claude Code