The step has nothing to do with the database.
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.
Removes most of the duplicated parse functions, introduces a common assert_field function with a more expressive error message.
Move common OPL creation code into a function and remove unused imports.