mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-12 13:29:04 +00:00
Abri relay credentials and defaults hydrate from environment configuration 🟥
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
f5fefd4d93
commit
39055bafed
1 changed files with 22 additions and 0 deletions
22
tests/infrastructure/abri/test_abri_config.py
Normal file
22
tests/infrastructure/abri/test_abri_config.py
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
from infrastructure.abri.config import AbriConfig
|
||||
|
||||
|
||||
def test_config_hydrates_relay_credentials_and_defaults_from_environment() -> None:
|
||||
# Arrange
|
||||
env = {
|
||||
"ABRI_RELAY_URL": "https://relay.example.test/api/DomnaRelay?code=key",
|
||||
"ABRI_RELAY_USERNAME": "DomnaWeb",
|
||||
"ABRI_RELAY_PASSWORD": "secret",
|
||||
"ABRI_RELAY_DEFAULT_RESOURCE": "CBRYAN",
|
||||
}
|
||||
|
||||
# Act
|
||||
config = AbriConfig.from_env(env)
|
||||
|
||||
# Assert
|
||||
assert config == AbriConfig(
|
||||
endpoint_url="https://relay.example.test/api/DomnaRelay?code=key",
|
||||
username="DomnaWeb",
|
||||
password="secret",
|
||||
default_resource="CBRYAN",
|
||||
)
|
||||
Loading…
Add table
Reference in a new issue