Sarah Hoffmann
dd03aeb966
bdd: use python library where possible
...
Replace calls to PHP scripts with direct calls into the
nominatim Python library where possible. This speed up
tests quite a bit.
2021-02-26 16:14:29 +01:00
Sarah Hoffmann
73cbb6eb9a
bdd: clean up DB ops steps
...
Adds comments and modernizes code.
2021-01-06 16:37:32 +01:00
Sarah Hoffmann
1f29475fa5
bdd: move column comparison in separate file
...
Introduces a new class DBRow that encapsulates the comparison
functions. This also is responsible for formatting more informative
assert messages. place and placex steps are unified.
2021-01-06 12:28:09 +01:00
Sarah Hoffmann
d586b95ff1
bdd: move nominitim id reader to separate file
2021-01-05 16:00:48 +01:00
Sarah Hoffmann
25557e5f14
bdd: factor out reindexing on updates
2021-01-05 15:17:46 +01:00
Sarah Hoffmann
197870e67a
bdd: move place table inserter into separate file
...
Also simplifies usage by implementing a function that inserts
a complete table row.
2021-01-05 12:12:59 +01:00
Sarah Hoffmann
b8e39d2dde
bdd: move scene setup to OSM data steps
...
The step has nothing to do with the database.
2021-01-05 11:42:28 +01:00
Sarah Hoffmann
5dfa76a610
bdd: switch to auto commit mode
...
Put the connection to the test database into auto-commit mode
and get rid of the explicit commits. Also use cursors always in
context managers and unify the two implementations that copy
data from the place table.
2021-01-05 11:42:28 +01:00
Sarah Hoffmann
58c471c627
bdd: remove class for lazy formatting
...
assert in combination with format() does the right thing and calls
the __str__() method only when an assertion hits.
2021-01-05 10:39:44 +01:00
Sarah Hoffmann
213bf7d19d
bdd: rename db_ops steps
...
Now all files implementing steps are called steps_*.py.
2021-01-05 10:20:00 +01:00