mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-16 15:47:58 +00:00
update API tests
This commit is contained in:
@@ -36,7 +36,7 @@ Feature: Search queries
|
||||
Then address of result 0 contains
|
||||
| type | value
|
||||
| house_number | 140
|
||||
| road | rue Don Bosco
|
||||
| road | [Rr]ue Don Bosco
|
||||
| city | Saguenay
|
||||
| state | Quebec
|
||||
| country | Canada
|
||||
@@ -50,7 +50,7 @@ Feature: Search queries
|
||||
Then address of result 0 contains
|
||||
| type | value
|
||||
| house_number | 141
|
||||
| road | rue Don Bosco
|
||||
| road | [rR]ue Don Bosco
|
||||
| city | Saguenay
|
||||
| state | Quebec
|
||||
| country | Canada
|
||||
|
||||
@@ -83,7 +83,7 @@ Feature: Search queries
|
||||
Scenario: bounded search remains within viewbox, even with no results
|
||||
Given the request parameters
|
||||
| bounded | viewbox
|
||||
| 1 | -5.662003,43.54285,-5.6563282,43.5403125
|
||||
| 1 | 43.54285,-5.662003,43.5403125,-5.6563282
|
||||
When sending json search query "restaurant"
|
||||
Then less than 1 result is returned
|
||||
|
||||
|
||||
@@ -199,7 +199,10 @@ def api_result_address_exact(step, resid):
|
||||
addr = world.results[resid]['address']
|
||||
for line in step.hashes:
|
||||
assert_in(line['type'], addr)
|
||||
assert_equals(line['value'], addr[line['type']])
|
||||
m = re.match("%s$" % line['value'], addr[line['type']])
|
||||
assert_is_not_none(m, msg="field %s does not match: %s$ != %s." % (
|
||||
line['type'], line['value'], addr[line['type']]))
|
||||
#assert_equals(line['value'], addr[line['type']])
|
||||
|
||||
@step(u'address of result (\d+) does not contain (.*)')
|
||||
def api_result_address_details_missing(step, resid, types):
|
||||
|
||||
Reference in New Issue
Block a user