From 39055bafedb15d21dee5b0ebb5df525461adfe6c Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Fri, 3 Jul 2026 14:34:27 +0000 Subject: [PATCH] =?UTF-8?q?Abri=20relay=20credentials=20and=20defaults=20h?= =?UTF-8?q?ydrate=20from=20environment=20configuration=20=F0=9F=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 --- tests/infrastructure/abri/test_abri_config.py | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 tests/infrastructure/abri/test_abri_config.py diff --git a/tests/infrastructure/abri/test_abri_config.py b/tests/infrastructure/abri/test_abri_config.py new file mode 100644 index 000000000..4e1d8c87d --- /dev/null +++ b/tests/infrastructure/abri/test_abri_config.py @@ -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", + )