def test_add_metadata_missing_graph_name(self, tmp_path):
        """Test that missing graph_name raises ValidationError during pass creation."""
        # Setup
        from olive.common.pydantic_v1 import ValidationError

        config = {}  # Missing required graph_name

        # Execute and Assert - Should fail during pass creation, not execution
        with pytest.raises(ValidationError, match="field required"):
            create_pass_from_dict(AddOliveMetadata, config, disable_search=True)
Test that missing graph_name raises ValidationError during pass creation.
test/unit_test/passes/onnx/test_add_metadata.py