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:
47
test/bdd/features/api/reverse/language.feature
Normal file
47
test/bdd/features/api/reverse/language.feature
Normal file
@@ -0,0 +1,47 @@
|
||||
Feature: Localization of reverse search results
|
||||
|
||||
Scenario: Reverse - default language
|
||||
When sending v1/reverse with format jsonv2
|
||||
| lat | lon |
|
||||
| 47.14 | 9.55 |
|
||||
Then a HTTP 200 is returned
|
||||
And the result is valid json
|
||||
And the result contains
|
||||
| address+country |
|
||||
| Liechtenstein |
|
||||
|
||||
Scenario: Reverse - accept-language parameter
|
||||
When sending v1/reverse with format jsonv2
|
||||
| lat | lon | accept-language |
|
||||
| 47.14 | 9.55 | ja,en |
|
||||
Then a HTTP 200 is returned
|
||||
And the result is valid json
|
||||
And the result contains
|
||||
| address+country |
|
||||
| リヒテンシュタイン |
|
||||
|
||||
Scenario: Reverse - HTTP accept language header
|
||||
Given the HTTP header
|
||||
| accept-language |
|
||||
| fo-ca,fo;q=0.8,en-ca;q=0.5,en;q=0.3 |
|
||||
When sending v1/reverse with format jsonv2
|
||||
| lat | lon |
|
||||
| 47.14 | 9.55 |
|
||||
Then a HTTP 200 is returned
|
||||
And the result is valid json
|
||||
And the result contains
|
||||
| address+country |
|
||||
| Liktinstein |
|
||||
|
||||
Scenario: Reverse - accept-language parameter and HTTP header
|
||||
Given the HTTP header
|
||||
| accept-language |
|
||||
| fo-ca,fo;q=0.8,en-ca;q=0.5,en;q=0.3 |
|
||||
When sending v1/reverse with format jsonv2
|
||||
| lat | lon | accept-language |
|
||||
| 47.14 | 9.55 | en |
|
||||
Then a HTTP 200 is returned
|
||||
And the result is valid json
|
||||
And the result contains
|
||||
| address+country |
|
||||
| Liechtenstein |
|
||||
Reference in New Issue
Block a user