From b602ba296e81f5cf6808a42e745b8ec1ed96e5a3 Mon Sep 17 00:00:00 2001 From: teknium1 <127238744+teknium1@users.noreply.github.com> Date: Sun, 13 Sep 2026 15:30:07 -0700 Subject: [PATCH] test(whatsapp): an explicit empty free_response_chats list is asserted without an explicit env value MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Under env → YAML → default an explicit env CSV beats the YAML list; the test now blanks the env (blank env = unset) before asserting that [] is a real 'no chats' value. --- tests/gateway/test_whatsapp_group_gating.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/gateway/test_whatsapp_group_gating.py b/tests/gateway/test_whatsapp_group_gating.py index 2e9b152dd1..96c5fd8c10 100644 --- a/tests/gateway/test_whatsapp_group_gating.py +++ b/tests/gateway/test_whatsapp_group_gating.py @@ -126,6 +126,8 @@ def test_blank_free_response_chats_falls_through_to_env(monkeypatch): adapter = object.__new__(WhatsAppAdapter) adapter.config = PlatformConfig(enabled=True, extra={"free_response_chats": ""}) assert adapter._whatsapp_free_response_chats() == {"123@g.us"} + # An explicit empty list is a real "no chats" value once no explicit env is set. + monkeypatch.setenv("WHATSAPP_FREE_RESPONSE_CHATS", " ") adapter.config = PlatformConfig(enabled=True, extra={"free_response_chats": []}) assert adapter._whatsapp_free_response_chats() == set()