Fixed tests so that db is wiped out each time