bdd: clean up DB ops steps

Adds comments and modernizes code.
This commit is contained in:
Sarah Hoffmann
2021-01-06 16:37:32 +01:00
parent 1f29475fa5
commit 73cbb6eb9a
2 changed files with 96 additions and 47 deletions

View File

@@ -196,7 +196,7 @@ class DBRow:
if actual == 0:
return "place ID 0"
with self.context.db.cursor():
with self.context.db.cursor() as cur:
cur.execute("""SELECT osm_type, osm_id, class
FROM placex WHERE place_id = %s""",
(actual, ))