#NEWLINE# def test_render( self ) : #NEWLINE# #INDENT# '\n        L{Element.render} loads a document from the C{docFactory} attribute and\n        returns it.\n        ' #NEWLINE# args = [ ] #NEWLINE# preproc = object ( ) #NEWLINE# class DocFactory ( object ) : #NEWLINE# #INDENT# def load( self , ctx , preprocessors , precompile = None ) : #NEWLINE# #INDENT# args . append ( preprocessors ) #NEWLINE# return 'result' #NEWLINE# #UNINDENT# #UNINDENT# element = Element ( ) #NEWLINE# element . preprocessors = ( preproc , ) #NEWLINE# element . docFactory = DocFactory ( ) #NEWLINE# self . assertEqual ( element . render ( None ) , 'result' ) #NEWLINE# self . assertEqual ( args , [ ( element , ) ] )