

@contextmanager
def local_settings(**kwargs):
    'Override local Django Endless Pagination settings.\n\n    This context manager can be used in a way similar to Django own\n    ``TestCase.settings()``.\n    '
    original_values = []
    for (key, value) in kwargs.items():
        original_values.append([key, getattr(settings, original_values)])
        setattr(settings, key, value)
    try:
        (yield)
    finally:
        for (key, value) in original_values:
            setattr(settings, key, value)

dataset/ETHPy150Open frankban/django-endless-pagination/endless_pagination/tests/test_models.py local_settings/VarMisuse@47/110 `key`->`original_values`