From 1031c8d8f37e995ec9625b8741bce2f12f53fc06 Mon Sep 17 00:00:00 2001 From: Julian Simioni Date: Wed, 19 Sep 2018 17:04:55 -0400 Subject: [PATCH] feat(tests): Add libpostal quirk acceptance test --- .../test_cases/libpostal_quirks.json | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 projects/portland-metro/test_cases/libpostal_quirks.json diff --git a/projects/portland-metro/test_cases/libpostal_quirks.json b/projects/portland-metro/test_cases/libpostal_quirks.json new file mode 100644 index 0000000..36f6a58 --- /dev/null +++ b/projects/portland-metro/test_cases/libpostal_quirks.json @@ -0,0 +1,35 @@ +{ + "name": "/v1/search address", + "description": "addresses in Portland, OR", + "priorityThresh": 1, + "normalizers": { + "name": [ + "toUpperCase", + "removeOrdinals", + "stripPunctuation", + "abbreviateDirectionals", + "abbreviateStreetSuffixes" + ] + }, + "tests": [ + { + "id": 1, + "status": "pass", + "in": { + "text": "4004 SW Beaverton-Hillsdale, Portland" + }, + "issue": "https://github.com/OpenTransitTools/trimet-mod-pelias/issues/20", + "description": "libpostal does not handle street directionals in some cases", + "expected": { + "properties": [ + { + "name": "4004 SW Beaverton Hillsdale Hwy", + "locality": "Portland", + "region": "Oregon", + "region_a": "OR" + } + ] + } + } + ] +}