fix tests for ensure_packages