#NEWLINE# def test_accept( self ) : #NEWLINE# #INDENT# class _Form ( Form ) : #NEWLINE# #INDENT# fields = [ FileField ( 'inp' ) ] #NEWLINE# #UNINDENT# env = AppEnvironment . create ( ) #NEWLINE# form = _Form ( env ) #NEWLINE# request = Request . blank ( '/' , POST = dict ( inp = ( 'file.txt' , 'ggg' ) ) ) #NEWLINE# self . assert_ ( form . accept ( form . POST ) , form . errors ) #NEWLINE# self . assertEqual ( form . python_data [ 'inp' ] . file . read ( ) , 'ggg' )