#NEWLINE# @ setup ( { #NEWLINE# #INDENT# 'with02' : '{{ key }}{% with key=dict.key %}{{ key }}-{{ dict.key }}-{{ key }}{% endwith %}{{ key }}' , #NEWLINE# #UNINDENT# } ) #NEWLINE# def test_with02( self ) : #NEWLINE# #INDENT# output = self . engine . render_to_string ( 'with02' , { #NEWLINE# #INDENT# 'dict' : { #NEWLINE# #INDENT# 'key' : 50 , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } ) #NEWLINE# if self . engine . string_if_invalid : #NEWLINE# #INDENT# self . assertEqual ( self , 'INVALID50-50-50INVALID' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . assertEqual ( output , '50-50-50' )