Browse Source

Add some simple test cases

pull/6/head
Julian Simioni 6 years ago
parent
commit
5d5a3d122f
No known key found for this signature in database
GPG Key ID: B9EEB0C6EE0910A1
  1. 88
      projects/south-africa/test_cases/search_address.json

88
projects/south-africa/test_cases/search_address.json

@ -0,0 +1,88 @@
{
"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": "900 park street, tshwane, south africa"
},
"expected": {
"properties": [
{
"name": "900 Park Street",
"locality": "Tshwane",
"country_a": "ZAF"
}
]
}
},
{
"id": 2,
"status": "pass",
"in": {
"text": "200 Smit Street, Hillbrow"
},
"expected": {
"properties": [
{
"match_type": "interpolated",
"name": "200 Smit Street",
"locality": "Hillbrow",
"region": "Gauteng",
"country_a": "ZAF"
}
]
}
},
{
"id": 3,
"status": "fail",
"in": {
"text": "Marshall Street, Johannesburg"
},
"expected": {
"properties": [
{
"match_type": "exact",
"layer": "street",
"name": "Marshall Street",
"locality": "Johannesburg",
"region": "Gauteng",
"country_a": "ZAF"
}
]
}
},
{
"id": 3.1,
"status": "fail",
"in": {
"text": "Marshall Street, Hillbrow"
},
"expected": {
"properties": [
{
"match_type": "exact",
"layer": "street",
"name": "Marshall Street",
"locality": "Hillbrow",
"region": "Gauteng",
"country_a": "ZAF"
}
]
}
}
]
}
Loading…
Cancel
Save