def test_infer_modality_proper_extension_found(self):
        """A test to ensure if the extension is found, we do not go to the mime type."""
        url = "https://example.com/file.mp3"

        with patch('marqo.core.inference.modality_utils._infer_modality_based_on_extension') as mock_infer_on_extension, \
                patch('marqo.core.inference.modality_utils.fetch_content_sample') as mock_fetch, \
                patch('marqo.core.inference.modality_utils.magic.from_buffer') as mock_magic, \
                patch('marqo.core.inference.modality_utils._infer_modality_based_on_mime_type') as mock_infer_on_mime:

            _ = infer_modality(url)
            mock_infer_on_extension.assert_called_once_with("mp3")
            mock_fetch.assert_not_called()
            mock_magic.assert_not_called()
            mock_infer_on_mime.assert_not_called()
A test to ensure if the extension is found, we do not go to the mime type.
tests/unit_tests/marqo/core/inference/test_infer_modality.py