Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /trisongz_lazyops /tests /e2e /test_settings.py
| import pytest | |
| import os | |
| from lzo.types import BaseSettings | |
| from pydantic import Field | |
| class SettingsConfig(BaseSettings): | |
| my_var: str = Field(..., alias="MY_VAR") | |
| nested_var: str = "default" | |
| def test_settings_env_loading(): | |
| """ | |
| Test loading settings from environment variables. | |
| """ | |
| os.environ["MY_VAR"] = "test_value" | |
| settings = SettingsConfig() | |
| assert settings.my_var == "test_value" | |
| del os.environ["MY_VAR"] | |
| def test_settings_defaults(): | |
| """ | |
| Test default values. | |
| """ | |
| os.environ["MY_VAR"] = "val" | |
| settings = SettingsConfig() | |
| assert settings.nested_var == "default" | |
| del os.environ["MY_VAR"] | |
Xet Storage Details
- Size:
- 658 Bytes
- Xet hash:
- 7f5016e7f92dae70451f75326500b20463268de17d6d98eb121a2beafa25a36b
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.