'Isolate uses of the modulestore after this call. Once
:py:meth:`end_modulestore_isolation` is called, this modulestore will
be flushed (all content will be deleted).'

@classmethod
def start_modulestore_isolation(cls):

    cls.disable_all_signals()
    cls.enable_signals_by_name(*cls.ENABLED_SIGNALS)
    cls.start_cache_isolation()
    override = override_settings(MODULESTORE=cls.MODULESTORE(), CONTENTSTORE=cls.CONTENTSTORE())
    cls.__old_modulestores.append(copy.deepcopy(settings.MODULESTORE))
    cls.__old_contentstores.append(copy.deepcopy(settings.CONTENTSTORE))
    override.__enter__()
    cls.__settings_overrides.append(override)
    XMODULE_FACTORY_LOCK.enable()
    clear_existing_modulestores()
    cls.store = modulestore()
