#NEWLINE# def test_get_mapped_data_no_display( self ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# key = 'tests.test_forms.CharField' #NEWLINE# registry . register ( CharField ) #NEWLINE# fm = FormModel . objects . create ( name = 'Form' , submit_url = '/form/' ) #NEWLINE# FormFieldModel . objects . create ( parent_form = fm , label = 'Label 1' , field_type = 'dynamic_forms.formfields.SingleLineTextField' , position = 1 ) #NEWLINE# FormFieldModel . objects . create ( parent_form = fm , label = 'Label 2' , field_type = key , position = 2 ) #NEWLINE# data = { #NEWLINE# #INDENT# 'label-1' : 'Value 1' , #NEWLINE# 'label-2' : 'NOT SHOWN!' , #NEWLINE# #UNINDENT# } #NEWLINE# form = FormModelForm ( model = fm , data = data ) #NEWLINE# self . assertTrue ( form . is_valid ( ) ) #NEWLINE# self . assertEqual ( form . get_mapped_data ( ) , OrderedDict ( [ ( 'Label 1' , 'Value 1' ) ] ) ) #NEWLINE# #UNINDENT# finally : #NEWLINE# #INDENT# registry . unregister ( key )