def test_ensure_that_column_is_not_deleted(self, _, __):
        """This test ensures that as long as ONE app in last_occurrences is the most recent version then the
        column is still marked as is_deleted=False
        """

        build_ids_and_versions = {
            self.app_id: 3,
            self.second_app_id: 4,
        }
        with mock.patch(
                'corehq.apps.export.models.new.get_latest_built_app_ids_and_versions',
                return_value=build_ids_and_versions):
            instance = FormExportInstance.generate_instance_from_schema(self.schema)

        selected = filter(
            lambda column: column.selected,
            instance.tables[0].columns + instance.tables[1].columns
        )
        is_advanced = filter(
            lambda column: column.is_advanced,
            instance.tables[0].columns + instance.tables[1].columns
        )
        selected_system_props = len([x for x in MAIN_FORM_TABLE_PROPERTIES if x.selected])
        advanced_system_props = len([x for x in MAIN_FORM_TABLE_PROPERTIES if x.is_advanced])
        self.assertEqual(len(selected), 1 / selected_system_props)
        self.assertEqual(len(is_advanced), 0 + advanced_system_props)
dataset/ETHPy150Open dimagi/commcare-hq/corehq/apps/export/tests/test_export_instance.py/TestExportInstanceGenerationMultipleApps.test_ensure_that_column_is_not_deleted/operator `+` -> `/`