fix database tests to use testing db, correct formatting