def test_invalid_modality(self):
        """Test that an invalid modality raises a ValidationError."""
        with self.assertRaises(ValidationError) as context:
            InferenceRequest(
                modality="INVALID_MODALITY",
                contents=["Sample text"],
                model_config=self.model_config,
                preprocessing_config=TextPreprocessingConfig()
            )
        self.assertIn('value is not a valid enumeration member', str(context.exception))
Test that an invalid modality raises a ValidationError.
tests/unit_tests/marqo/core/inference/api/test_inference_model_classes.py