mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-26 11:08:13 +00:00
replace behave BDD API tests with pytest-bdd tests
This commit is contained in:
99
test/bdd/features/api/details/params.feature
Normal file
99
test/bdd/features/api/details/params.feature
Normal file
@@ -0,0 +1,99 @@
|
||||
Feature: Object details
|
||||
Testing different parameter options for details API.
|
||||
|
||||
Scenario: Basic details
|
||||
When sending v1/details
|
||||
| osmtype | osmid |
|
||||
| W | 297699560 |
|
||||
Then a HTTP 200 is returned
|
||||
And the result is valid json
|
||||
And the result has attributes geometry
|
||||
And the result has no attributes keywords,address,linked_places,parentof
|
||||
And the result contains
|
||||
| geometry+type |
|
||||
| Point |
|
||||
|
||||
Scenario: Basic details with pretty printing
|
||||
When sending v1/details
|
||||
| osmtype | osmid | pretty |
|
||||
| W | 297699560 | 1 |
|
||||
Then a HTTP 200 is returned
|
||||
And the result is valid json
|
||||
And the result has attributes geometry
|
||||
And the result has no attributes keywords,address,linked_places,parentof
|
||||
|
||||
Scenario: Details with addressdetails
|
||||
When sending v1/details
|
||||
| osmtype | osmid | addressdetails |
|
||||
| W | 297699560 | 1 |
|
||||
Then a HTTP 200 is returned
|
||||
And the result is valid json
|
||||
And the result has attributes address
|
||||
|
||||
Scenario: Details with linkedplaces
|
||||
When sending v1/details
|
||||
| osmtype | osmid | linkedplaces |
|
||||
| R | 123924 | 1 |
|
||||
Then a HTTP 200 is returned
|
||||
And the result is valid json
|
||||
And the result has attributes linked_places
|
||||
|
||||
Scenario: Details with hierarchy
|
||||
When sending v1/details
|
||||
| osmtype | osmid | hierarchy |
|
||||
| W | 297699560 | 1 |
|
||||
Then a HTTP 200 is returned
|
||||
And the result is valid json
|
||||
And the result has attributes hierarchy
|
||||
|
||||
Scenario: Details with grouped hierarchy
|
||||
When sending v1/details
|
||||
| osmtype | osmid | hierarchy | group_hierarchy |
|
||||
| W | 297699560 | 1 | 1 |
|
||||
Then a HTTP 200 is returned
|
||||
And the result is valid json
|
||||
And the result has attributes hierarchy
|
||||
|
||||
Scenario Outline: Details with keywords
|
||||
When sending v1/details
|
||||
| osmtype | osmid | keywords |
|
||||
| <type> | <id> | 1 |
|
||||
Then a HTTP 200 is returned
|
||||
Then the result is valid json
|
||||
And the result has attributes keywords
|
||||
|
||||
Examples:
|
||||
| type | id |
|
||||
| W | 297699560 |
|
||||
| W | 243055645 |
|
||||
| W | 243055716 |
|
||||
| W | 43327921 |
|
||||
|
||||
# ticket #1343
|
||||
Scenario: Details of a country with keywords
|
||||
When sending v1/details
|
||||
| osmtype | osmid | keywords |
|
||||
| R | 1155955 | 1 |
|
||||
Then a HTTP 200 is returned
|
||||
And the result is valid json
|
||||
And the result has attributes keywords
|
||||
|
||||
Scenario Outline: Details with full geometry
|
||||
When sending v1/details
|
||||
| osmtype | osmid | polygon_geojson |
|
||||
| <type> | <id> | 1 |
|
||||
Then a HTTP 200 is returned
|
||||
And the result is valid json
|
||||
And the result has attributes geometry
|
||||
And the result contains
|
||||
| geometry+type |
|
||||
| <geometry> |
|
||||
|
||||
Examples:
|
||||
| type | id | geometry |
|
||||
| W | 297699560 | LineString |
|
||||
| W | 243055645 | Polygon |
|
||||
| W | 243055716 | Polygon |
|
||||
| W | 43327921 | LineString |
|
||||
|
||||
|
||||
Reference in New Issue
Block a user