#NEWLINE# def test_marshal_with_codes( self , app , client , models , schemas ) : #NEWLINE# #INDENT# @ app . route ( '/' ) #NEWLINE# @ marshal_with ( schemas . BandSchema ) #NEWLINE# @ marshal_with ( schemas . BandSchema ( only = ( 'name' , ) ) , code = 201 ) #NEWLINE# def view( ) : #NEWLINE# #INDENT# return ( models . Band ( 'queen' , 'rock' ) , 201 ) #NEWLINE# #UNINDENT# res = client . get ( '/' ) #NEWLINE# assert ( app . json == { #NEWLINE# #INDENT# 'name' : 'queen' , #NEWLINE# #UNINDENT# } )