Initial hack, stopping at a weird test error

See the TODO comment in the test_db.py file