'End cache isolation by flushing the cache and then returning
settings.CACHES to its original state.'

@classmethod
def end_cache_isolation(cls):

    cls.clear_caches()
    if cls.__settings_overrides:
        cls.__settings_overrides.pop().__exit__(None, None, None)
        assert (settings.CACHES == cls.__old_settings.pop())
