mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-16 15:47:58 +00:00
implement BDD osm2pgsql tests with pytest-bdd
This commit is contained in:
48
test/bdd/features/osm2pgsql/update/simple.feature
Normal file
48
test/bdd/features/osm2pgsql/update/simple.feature
Normal file
@@ -0,0 +1,48 @@
|
||||
Feature: Update of simple objects by osm2pgsql
|
||||
Testing basic update functions of osm2pgsql.
|
||||
|
||||
Scenario: Adding a new object
|
||||
When loading osm data
|
||||
"""
|
||||
n1 Tplace=town,name=Middletown
|
||||
"""
|
||||
Then place contains exactly
|
||||
| object | class | type | name+name |
|
||||
| N1 | place | town | Middletown |
|
||||
|
||||
When updating osm data
|
||||
"""
|
||||
n2 Tamenity=hotel,name=Posthotel
|
||||
"""
|
||||
Then place contains exactly
|
||||
| object | class | type | name+name |
|
||||
| N1 | place | town | Middletown |
|
||||
| N2 | amenity | hotel | Posthotel |
|
||||
And placex contains exactly
|
||||
| object | class | type | name+name | indexed_status |
|
||||
| N1 | place | town | Middletown | 0 |
|
||||
| N2 | amenity | hotel | Posthotel | 1 |
|
||||
|
||||
|
||||
Scenario: Deleting an existing object
|
||||
When loading osm data
|
||||
"""
|
||||
n1 Tplace=town,name=Middletown
|
||||
n2 Tamenity=hotel,name=Posthotel
|
||||
"""
|
||||
Then place contains exactly
|
||||
| object | class | type | name+name |
|
||||
| N1 | place | town | Middletown |
|
||||
| N2 | amenity | hotel | Posthotel |
|
||||
|
||||
When updating osm data
|
||||
"""
|
||||
n2 dD
|
||||
"""
|
||||
Then place contains exactly
|
||||
| object | class | type | name+name |
|
||||
| N1 | place | town | Middletown |
|
||||
And placex contains exactly
|
||||
| object | class | type | name+name | indexed_status |
|
||||
| N1 | place | town | Middletown | 0 |
|
||||
| N2 | amenity | hotel | Posthotel | 100 |
|
||||
Reference in New Issue
Block a user