Skip to content

Commit 30f3f9a

Browse files
committed
test: consolidate care response tests and strict match Spain helpline
1 parent aa941ef commit 30f3f9a

1 file changed

Lines changed: 21 additions & 24 deletions

File tree

tests/test_care_response.py

Lines changed: 21 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,27 @@ def test_message_contains_international_resource(self):
4141
def test_message_contains_emergency_guidance(self):
4242
assert "emergency" in CARE_RESPONSE_BLOCK.lower()
4343

44+
def test_message_contains_japan_resource(self):
45+
assert "0120-783-556" in CARE_RESPONSE_BLOCK
46+
47+
def test_message_contains_south_korea_resource(self):
48+
assert "1393" in CARE_RESPONSE_BLOCK
49+
50+
def test_message_contains_spain_resource(self):
51+
assert "Línea de Atención a conducta suicida: 024" in CARE_RESPONSE_BLOCK
52+
53+
def test_message_contains_italy_resource(self):
54+
assert "800 274 274" in CARE_RESPONSE_BLOCK
55+
56+
def test_message_contains_mexico_resource(self):
57+
assert "800 290 0024" in CARE_RESPONSE_BLOCK
58+
59+
def test_message_contains_new_zealand_resource(self):
60+
assert "1737" in CARE_RESPONSE_BLOCK
61+
62+
def test_message_contains_france_second_resource(self):
63+
assert "3114" in CARE_RESPONSE_BLOCK
64+
4465

4566
class TestCareResponseForward:
4667
"""Forward mode injects care context into the LLM payload."""
@@ -103,27 +124,3 @@ def test_custom_message_overrides_default(self):
103124
result = get_self_harm_response()
104125
assert result["message"] == "Custom care message for tests."
105126

106-
107-
class TestCareResponseBlockNewCountries:
108-
"""New country helplines are present in the built-in care response."""
109-
110-
def test_message_contains_japan_resource(self):
111-
assert "0120-783-556" in CARE_RESPONSE_BLOCK
112-
113-
def test_message_contains_south_korea_resource(self):
114-
assert "1393" in CARE_RESPONSE_BLOCK
115-
116-
def test_message_contains_spain_resource(self):
117-
assert "024" in CARE_RESPONSE_BLOCK
118-
119-
def test_message_contains_italy_resource(self):
120-
assert "800 274 274" in CARE_RESPONSE_BLOCK
121-
122-
def test_message_contains_mexico_resource(self):
123-
assert "800 290 0024" in CARE_RESPONSE_BLOCK
124-
125-
def test_message_contains_new_zealand_resource(self):
126-
assert "1737" in CARE_RESPONSE_BLOCK
127-
128-
def test_message_contains_france_second_resource(self):
129-
assert "3114" in CARE_RESPONSE_BLOCK

0 commit comments

Comments
 (0)