def test_infer_modality_logic_image_true_and_media_false(self):
        """Test the logic of the infer_modality method in UnstructuredAddDocumentsHandler when
        treat_urls_and_pointers_as_images=True and treat_urls_and_pointers_as_media=False."""
        handler = self._get_handler(treat_as_images=True, treat_as_media=False)
        test_cases = [
            (self.AUDIO_URL, "audio url should be treated as text", Modality.TEXT),
            (self.VIDEO_URL, "video url should be treated as text", Modality.TEXT),
            (self.IMAGE_URL, "image url should be treated as image", Modality.IMAGE),
            ('text', "text should be treated as text", Modality.TEXT),
        ]

        for url, test_case, expected_modality in test_cases:
            with self.subTest(msg=test_case):
                modality = handler._infer_modality(
                    TensorField(doc_id='id', field_name='dummy_field_name', field_content=url,
                                is_top_level_tensor_field=True))
                self.assertEqual(expected_modality,modality)
Test the logic of the infer_modality method in UnstructuredAddDocumentsHandler when
        treat_urls_and_pointers_as_images=True and treat_urls_and_pointers_as_media=False.
tests/unit_tests/marqo/core/unstructured_vespa_index/test_unstructured_add_documents_handler.py