#NEWLINE# def test_alphatag( self ) : #NEWLINE# #INDENT# record = Record ( ) #NEWLINE# record . add_field ( Field ( 'CAT' , [ ' ' , ' ' ] , subfields = [ 'a' , 'foo' ] ) ) #NEWLINE# record . add_field ( Field ( 'CAT' , [ ' ' , ' ' ] , subfields = [ 'b' , 'bar' ] ) ) #NEWLINE# fields = record . get_fields ( 'CAT' ) #NEWLINE# self . assertEqual ( len ( fields ) , 2 ) #NEWLINE# self . assertEqual ( fields [ 0 ] [ 'a' ] , 'foo' ) #NEWLINE# self . assertEqual ( fields [ 1 ] [ 'b' ] , 'bar' ) #NEWLINE# self . assertEqual ( record [ 'CAT' ] [ 'a' ] , 'foo' )