#NEWLINE# def test_fieldlist_with_initial_and_initial( self ) : #NEWLINE# #INDENT# 'Initialization of form object with fieldlist with initial and initial values' #NEWLINE# class _Form ( Form ) : #NEWLINE# #INDENT# fields = [ FieldList ( 'list' , field = Field ( 'number' , convs . Int ( ) , initial = 2 ) ) ] #NEWLINE# #UNINDENT# env = AppEnvironment . create ( ) #NEWLINE# form = _Form ( env , initial = { #NEWLINE# #INDENT# 'list' : [ 1 , 2 ] , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertEqual ( form . raw_data , MultiDict ( [ ( 'list-indices' , '1' ) , ( 'list-indices' , '2' ) , ( 'list.1' , '1' ) , ( 'list.2' , '2' ) ] ) ) #NEWLINE# self . assertEqual ( env . python_data , { #NEWLINE# #INDENT# 'list' : [ 1 , 2 ] , #NEWLINE# #UNINDENT# } )