def test_proper_error_is_raised_when_adding_documents_with_unsupported(self):
        """Test to ensure that the proper error is raised when adding documents with invalid media"""

        test_docs = [
            {
                "_id": "1",
                "image_field_1": TestImageUrls.IMAGE1.value,
                "text_field_1": "This is a valid image",
            },
        ]

        with self.assertRaises(InferenceError) as cm:
            _ = self.add_documents(
                config=self.config,
                add_docs_params=AddDocsParams(
                    index_name=self.unstructured_languagebind_index_with_limited_supported_modalities_name,
                    docs=test_docs,
                    tensor_fields=["image_field_1"]
                )
            )
        self.assertIn("The model does not support the requested modality.", str(cm.exception))


        with self.assertRaises(api_exceptions.InvalidArgError) as cm:
            _ = tensor_search.search(
                config=self.config,
                index_name=self.unstructured_languagebind_index_with_limited_supported_modalities_name,
                text=TestVideoUrls.VIDEO1.value,
                search_method = "TENSOR"
            )

        self.assertIn("The model does not support the requested modality.", str(cm.exception))
Test to ensure that the proper error is raised when adding documents with invalid media
tests/integ_tests/tensor_search/integ_tests/test_add_documents_combined.py