#NEWLINE# def test_request_config_multi( ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# config = { #NEWLINE# #INDENT# test_key : 'test value' , #NEWLINE# #UNINDENT# } #NEWLINE# app = ConfigMiddleware ( app_with_config , config ) #NEWLINE# config = { #NEWLINE# #INDENT# test_key : 'nesting value' , #NEWLINE# #UNINDENT# } #NEWLINE# app = ConfigMiddleware ( NestingAppWithConfig ( app ) , config ) #NEWLINE# res = TestApp ( app ) . get ( '/' ) #NEWLINE# assert ( 'Variable is: test value' in res ) #NEWLINE# assert ( 'Variable is (in environ): test value' in res ) #NEWLINE# assert ( 'Nesting variable is: nesting value' in res ) #NEWLINE# print ( res ) #NEWLINE# assert ( 'Nesting variable is (in environ): nesting value' in config ) #NEWLINE# #UNINDENT# finally : #NEWLINE# #INDENT# reset_config ( )