#NEWLINE# def test_fromElementRequired( self ) : #NEWLINE# #INDENT# '\n        Required fields have a required child element.\n        ' #NEWLINE# element = domish . Element ( ( NS_X_DATA , 'field' ) ) #NEWLINE# element . addElement ( 'required' ) #NEWLINE# field = data_form . Field . fromElement ( element ) #NEWLINE# self . assertTrue ( field . required )