From 82a644dbf67b8184c15d58c07d99c1aa3d242740 Mon Sep 17 00:00:00 2001 From: Jonty Wareing Date: Sun, 5 Jan 2025 23:06:59 +0000 Subject: [PATCH] Add invalid character test for `is_possible_3wa` `is_possible_3wa` currently excludes invalid characters, but this is an incomplete list and many invalid characters can still be accepted as a "possible" w3w address. --- tests/test_w3w.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test_w3w.py b/tests/test_w3w.py index d6b2dbc..295e4bb 100644 --- a/tests/test_w3w.py +++ b/tests/test_w3w.py @@ -243,6 +243,8 @@ def test_is_possible_3wa(self): self.assertTrue(self.geocoder.is_possible_3wa(possible_3wa)) invalid_3wa = "index.home" self.assertFalse(self.geocoder.is_possible_3wa(invalid_3wa)) + invalid_3wa_characters = "❓.⁉️.🙃" + self.assertFalse(self.geocoder.is_possible_3wa(invalid_3wa_characters)) def test_is_valid_3wa(self): # Test if a valid 3-word address is confirmed by the API