fix tests
extract creation of in-memory db