Skip to content

Commit aa941ef

Browse files
authored
feat: add crisis helpline numbers for 10 new countries (#26)
* feat: add crisis helpline numbers for 10 new countries * fix: correct YAML indentation for block_message * fix: move helplines to CARE_RESPONSE_BLOCK, revert config block_message, add tests for new countries * fix: remove trailing blank lines, add country helplines to router.py, fix test assertions * fix: merge duplicate France entry, fix Japan indentation, add France 3114 test, fix test file formatting
1 parent 1924099 commit aa941ef

2 files changed

Lines changed: 44 additions & 0 deletions

File tree

humane_proxy/escalation/router.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,32 @@
4646
4747
🇫🇷 France
4848
• Suicide Écoute: 01 45 39 40 00
49+
• Numéro National Prévention Suicide: 3114
4950
5051
🇧🇷 Brazil
5152
• CVV (Centro de Valorização da Vida): 188
5253
5354
🇿🇦 South Africa
5455
• SADAG: 0800 567 567
5556
57+
🇯🇵 Japan
58+
• Inochi no Denwa: 0120-783-556
59+
60+
🇰🇷 South Korea
61+
• Crisis Counseling Hotline: 1393
62+
63+
🇪🇸 Spain
64+
• Línea de Atención a conducta suicida: 024
65+
66+
🇮🇹 Italy
67+
• Telefono Amico: 800 274 274
68+
69+
🇲🇽 Mexico
70+
• SAPTEL: 800 290 0024
71+
72+
🇳🇿 New Zealand
73+
• Need to Talk?: 1737
74+
5675
🌐 International:
5776
• IASP Crisis Centres: https://www.iasp.info/resources/Crisis_Centres/
5877
• Befrienders Worldwide: https://www.befrienders.org

tests/test_care_response.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,3 +102,28 @@ def test_custom_message_overrides_default(self):
102102
with patch("humane_proxy.escalation.router.get_config", return_value=self._custom_config()):
103103
result = get_self_harm_response()
104104
assert result["message"] == "Custom care message for tests."
105+
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)