#NEWLINE# def test_named_block_noresolve( self ) : #NEWLINE# #INDENT# class StartBlock ( core . Tag ) : #NEWLINE# #INDENT# options = core . Options ( arguments . Argument ( 'myarg' , resolve = False ) , blocks = [ BlockDefinition ( 'nodelist' , VariableBlockName ( 'end_block %(value)s' , 'myarg' ) , 'end_block' ) ] ) #NEWLINE# def render_tag( self , context , myarg , nodelist ) : #NEWLINE# #INDENT# return ( 'nodelist:%s;myarg:%s' % ( nodelist . render ( context ) , myarg ) ) #NEWLINE# #UNINDENT# #UNINDENT# with TemplateTags ( StartBlock ) : #NEWLINE# #INDENT# ctx = template . Context ( ) #NEWLINE# tpl = template . Template ( "{% start_block 'hello' %}nodelist-content{% end_block 'hello' %}" ) #NEWLINE# output = tpl . render ( ctx ) #NEWLINE# expected_output = 'nodelist:nodelist-content;myarg:hello' #NEWLINE# self . assertEqual ( output , expected_output )