Model/tests/infrastructure/abri/test_abri_config.py
Daniel Roth edd4ec00de Make the OpenHousing resource mandatory, dropping the default fallback
The deal's third_party_surveyor_identifier is now required by the log
and amend flows: the trigger contract rejects messages without it
(blank treated as missing, since a blank resource makes OpenHousing
silently drop the appointment), and LogJobRequest/AmendJobRequest carry
it as a required field. The ABRI_RELAY_DEFAULT_RESOURCE fallback and
its config/terraform/workflow wiring are removed as dead code.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-17 13:13:28 +00:00

20 lines
552 B
Python

from infrastructure.abri.config import AbriConfig
def test_config_hydrates_relay_credentials_from_environment() -> None:
# Arrange
env = {
"ABRI_RELAY_URL": "https://relay.example.test/api/DomnaRelay?code=key",
"ABRI_RELAY_USERNAME": "DomnaWeb",
"ABRI_RELAY_PASSWORD": "secret",
}
# Act
config = AbriConfig.from_env(env)
# Assert
assert config == AbriConfig(
endpoint_url="https://relay.example.test/api/DomnaRelay?code=key",
username="DomnaWeb",
password="secret",
)