Update tests for requires_username mode for database connection