def test_model_loading_failure(self, mock_auto_model, mock_auto_tokenizer):
        """Test that an error is raised when the model fails to load."""
        model_properties = {
            "name": "test-model",
            "type": "hf",
            "poolingMethod": "mean",
            "dimensions": 768
        }

        with self.assertRaises(InvalidModelPropertiesError) as excinfo:
            model = HuggingFaceModel(model_properties, "cpu", {})
            model.load()

        self.assertIn("Model load failed", str(excinfo.exception))
Test that an error is raised when the model fails to load.
tests/integ_tests/core/inference/embedding_models/test_hugging_face_model.py