'Change the _get_collection_name and clear the cached collection.'

def __enter__(self):

    @classmethod
    def _get_collection_name(cls):
        return self.collection_name
    self.cls._get_collection_name = _get_collection_name
    self.cls._collection = None
    return self.cls
