Add @db_connect in tests and remove duplicate db connection code