Fix tests for non sqlite dbs