fix some tests
don't use sqlite in memory db for testing

using a db on filesystem is faster as pytest supports reusing the existing db, that way it's only slow on first run