def METHOD_NAME(self, is_within_directory_patch, tarfile_open_patch):
    tarfile_path = "/test_tarfile_path/"
    unpack_dir = "/test_unpack_dir/"
    is_within_directory_patch.return_value = False
    tarfile_file_mock = Mock()
    tar_file_obj_mock = Mock()
    tar_file_obj_mock.name = "obj_name"
    tarfile_file_mock.getmembers.return_value = [tar_file_obj_mock]
    tarfile_open_patch.return_value.__enter__.return_value = tarfile_file_mock
    with self.assertRaises(tarfile.ExtractError):
        extract_tarfile(tarfile_path=tarfile_path, unpack_dir=unpack_dir)
    is_within_directory_patch.assert_called_once()
    tarfile_file_mock.getmembers.assert_called_once()