#NEWLINE# def test_file( self ) : #NEWLINE# #INDENT# ' input file node contains type=file attr ' #NEWLINE# class TForm ( yota . Form ) : #NEWLINE# #INDENT# t = FileNode ( name = 'something' ) #NEWLINE# #UNINDENT# test = TForm ( enctype = 'multipart/form-data' ) . render ( ) #NEWLINE# bs = BeautifulSoup ( test ) #NEWLINE# assert ( len ( bs . findAll ( 'input' , { #NEWLINE# #INDENT# 'type' : 'file' , #NEWLINE# #UNINDENT# } ) ) == 1 ) #NEWLINE# assert ( len ( bs . findAll ( 'form' , { #NEWLINE# #INDENT# 'enctype' : 'multipart/form-data' , #NEWLINE# #UNINDENT# } ) ) == 1 )