#NEWLINE# def test_ctor_subfields( self ) : #NEWLINE# #INDENT# field = self . _makeOne ( 'phone_number' , 'RECORD' , fields = [ self . _makeOne ( 'area_code' , 'STRING' ) , self . _makeOne ( 'local_number' , 'STRING' ) ] ) #NEWLINE# self . assertEqual ( field . name , 'phone_number' ) #NEWLINE# self . assertEqual ( field . field_type , 'RECORD' ) #NEWLINE# self . assertEqual ( field . mode , 'NULLABLE' ) #NEWLINE# self . assertEqual ( field . description , None ) #NEWLINE# self . assertEqual ( len ( field . fields ) , 2 ) #NEWLINE# self . assertEqual ( field . fields [ 0 ] . name , 'area_code' ) #NEWLINE# self . assertEqual ( field . fields [ 0 ] . field_type , 'STRING' ) #NEWLINE# self . assertEqual ( field . fields [ 0 ] . mode , 'NULLABLE' ) #NEWLINE# self . assertEqual ( field . fields [ 0 ] . description , None ) #NEWLINE# self . assertEqual ( field . fields [ 0 ] . fields , None ) #NEWLINE# self . assertEqual ( field . fields [ 1 ] . name , 'local_number' ) #NEWLINE# self . assertEqual ( field . fields [ 1 ] . field_type , 'STRING' ) #NEWLINE# self . assertEqual ( field . fields [ 1 ] . mode , 'NULLABLE' ) #NEWLINE# self . assertEqual ( field . fields [ 1 ] . description , None ) #NEWLINE# self . assertEqual ( field . fields [ 1 ] . fields , None )