Tests updated to use the database