Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions humane_proxy/escalation/router.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,27 @@
🇿🇦 South Africa
• SADAG: 0800 567 567

🇯🇵 Japan
• Inochi no Denwa: 0120-783-556

🇰🇷 South Korea
• Crisis Counseling Hotline: 1393

🇫🇷 France
• Numéro National Prévention Suicide: 3114

🇪🇸 Spain
• Línea de Atención a conducta suicida: 024

🇮🇹 Italy
• Telefono Amico: 800 274 274

🇲🇽 Mexico
• SAPTEL: 800 290 0024

🇳🇿 New Zealand
• Need to Talk?: 1737

🌐 International:
• IASP Crisis Centres: https://www.iasp.info/resources/Crisis_Centres/
• Befrienders Worldwide: https://www.befrienders.org
Expand Down
20 changes: 20 additions & 0 deletions tests/test_care_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,23 @@ def test_custom_message_overrides_default(self):
with patch("humane_proxy.escalation.router.get_config", return_value=self._custom_config()):
result = get_self_harm_response()
assert result["message"] == "Custom care message for tests."
class TestCareResponseBlockNewCountries:
"""New country helplines are present in the built-in care response."""

def test_message_contains_japan_resource(self):
assert "0120-783-556" in CARE_RESPONSE_BLOCK

def test_message_contains_south_korea_resource(self):
assert "1393" in CARE_RESPONSE_BLOCK

def test_message_contains_spain_resource(self):
assert "024" in CARE_RESPONSE_BLOCK

def test_message_contains_italy_resource(self):
assert "800 274 274" in CARE_RESPONSE_BLOCK

def test_message_contains_mexico_resource(self):
assert "800 290 0024" in CARE_RESPONSE_BLOCK

def test_message_contains_new_zealand_resource(self):
assert "1737" in CARE_RESPONSE_BLOCK
Loading