forked from hans/Nominatim
add tests for geocodejson and fix syntax errors
This commit is contained in:
@@ -48,6 +48,10 @@ Feature: Simple Reverse Tests
|
||||
| param | value |
|
||||
| <parameter> | <value> |
|
||||
Then the result is valid geojson
|
||||
When sending geocodejson reverse coordinates 53.603,10.041
|
||||
| param | value |
|
||||
| <parameter> | <value> |
|
||||
Then the result is valid geocodejson
|
||||
|
||||
Examples:
|
||||
| parameter | value |
|
||||
|
||||
@@ -27,6 +27,10 @@ Feature: Simple Tests
|
||||
| param | value |
|
||||
| <parameter> | <value> |
|
||||
Then at least 1 result is returned
|
||||
When sending geocodejson search query "Hamburg"
|
||||
| param | value |
|
||||
| <parameter> | <value> |
|
||||
Then at least 1 result is returned
|
||||
|
||||
Examples:
|
||||
| parameter | value |
|
||||
|
||||
@@ -114,6 +114,9 @@ class SearchResponse(GenericResponse):
|
||||
self.parse_json()
|
||||
self.result = geojson_results_to_json_results(self.result)
|
||||
|
||||
def parse_geocodejson(self):
|
||||
return self.parse_geojson()
|
||||
|
||||
def parse_html(self):
|
||||
content, errors = tidy_document(self.page,
|
||||
options={'char-encoding' : 'utf8'})
|
||||
@@ -195,6 +198,9 @@ class ReverseResponse(GenericResponse):
|
||||
return
|
||||
self.result = geojson_results_to_json_results(self.result[0])
|
||||
|
||||
def parse_geocodejson(self):
|
||||
return self.parse_geojson()
|
||||
|
||||
def parse_xml(self):
|
||||
et = ET.fromstring(self.page)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user