Use an in-memory sqlite database in test mode.

This speeds up the tests a bit without any tradeoff that I am aware of.