codex/backend-optimization #2
@@ -19,7 +19,8 @@ class Config(BaseSettings):
|
|||||||
HELPER_ID: str = ''
|
HELPER_ID: str = ''
|
||||||
|
|
||||||
model_config = SettingsConfigDict(
|
model_config = SettingsConfigDict(
|
||||||
env_file=('config/.env', 'config/.env.dev', 'config/.env.prod')
|
env_file=('config/.env', 'config/.env.dev', 'config/.env.prod'),
|
||||||
|
extra='ignore',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
from config.main import Config
|
||||||
|
|
||||||
|
|
||||||
|
def test_config_ignores_extra_environment_fields():
|
||||||
|
assert Config.model_config.get('extra') == 'ignore'
|
||||||
Reference in New Issue
Block a user