def change_config(key, value):
 def decorator(func):
  @functools.wraps(func)
  def wrapper(*args, **kwargs):
   with changed_config(key, value):
    return func(*args, **kwargs)
  return wrapper
 return decorator

def change_config ( key , value ) : def decorator ( func ) : @ functools . wraps ( func ) def wrapper ( * args , ** kwargs ) : with changed_config ( key , value ) : return func ( * args , ** kwargs ) return wrapper return decorator
decorator to temporarily change ckans config to a new value this allows you to easily create tests that need specific config values to be set .