Use sqlite for testing, fix dodgy test