def test_incomplete_download_open_clip_no_mock(self):
        '''An end-to-end test of corrupted file handling in open_clip model loading
        '''
        model_properties = {
            "name": "ViT-B-32",
            "dimensions": 512,
            "url": "https://marqo-unittest-storage.s3.us-west-2.amazonaws.com/corrupted_vit_b_32-quickgelu-laion400m_e32-46683a32.pt",
            "type": "open_clip",
        }
        mock_remove = MagicMock()

        with patch("os.remove", mock_remove):
            with self.assertRaises(InvalidModelPropertiesError) as context:
                _ = _load_model(**self.load_parameters, model_properties=model_properties, max_retries=1)

        mock_remove.assert_called_once()

        self.assertIn(
            "Marqo encountered a corrupted file when loading open_clip file",
            str(context.exception))
An end-to-end test of corrupted file handling in open_clip model loading
        
tests/integ_tests/core/inference/test_corrupt_file_error_handling.py