mirror of
https://github.com/fastapi/fastapi.git
synced 2026-05-18 05:15:46 -04:00
📝 Add documentation about settings and env vars (#1118)
* Add doc and example for env var config * Syntax highlight for .env file * Add test for configuration docs * 📝 Update settings docs, add more examples * ✅ Add tests for settings * 🚚 Rename "Application Configuration" to "Metadata and Docs URLs" to disambiguate between that and settings * 🔥 Remove replaced example file Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
from fastapi.testclient import TestClient
|
||||
|
||||
from application_configuration.tutorial001 import app
|
||||
from metadata.tutorial001 import app
|
||||
|
||||
client = TestClient(app)
|
||||
|
||||
0
tests/test_tutorial/test_settings/__init__.py
Normal file
0
tests/test_tutorial/test_settings/__init__.py
Normal file
9
tests/test_tutorial/test_settings/test_app02.py
Normal file
9
tests/test_tutorial/test_settings/test_app02.py
Normal file
@@ -0,0 +1,9 @@
|
||||
from fastapi.testclient import TestClient
|
||||
|
||||
from settings.app02 import main, test_main
|
||||
|
||||
client = TestClient(main.app)
|
||||
|
||||
|
||||
def test_setting_override():
|
||||
test_main.test_app()
|
||||
Reference in New Issue
Block a user