#NEWLINE# def require_backend( required_backend ) : #NEWLINE# #INDENT# '\n    Raise ``SkipTest`` unless the functional test configuration has\n    ``required_backend``.\n\n    :param unicode required_backend: The name of the required backend.\n    :returns: A function decorator.\n    ' #NEWLINE# def decorator( undecorated_object ) : #NEWLINE# #INDENT# @ wraps ( undecorated_object ) #NEWLINE# def wrapper( * args , **kwargs ) : #NEWLINE# #INDENT# config = get_blockdevice_config ( ) #NEWLINE# configured_backend = config . pop ( 'backend' ) #NEWLINE# skipper = skipUnless ( ( configured_backend == required_backend ) , 'The backend in the supplied configuration is not suitable for this test. Found: {!r}. Required: {!r}.' . format ( configured_backend , required_backend ) ) #NEWLINE# decorated_object = skipper ( undecorated_object ) #NEWLINE# result = decorated_object ( * args , ** kwargs ) #NEWLINE# return result #NEWLINE# #UNINDENT# return wrapper #NEWLINE# #UNINDENT# return decorator