#NEWLINE# def test_subjects( self ) : #NEWLINE# #INDENT# record = Record ( ) #NEWLINE# subject1 = '=630  0\\$aTosefta.$lEnglish.$f1977.' #NEWLINE# subject2 = '=600  10$aLe Peu, Pepe.' #NEWLINE# shlist = [ subject1 , subject2 ] #NEWLINE# self . assertEquals ( record . subjects ( ) , [ ] ) #NEWLINE# record . add_field ( Field ( '630' , [ 0 , ' ' ] , subfields = [ 'a' , 'Tosefta.' , 'l' , 'English.' , 'f' , '1977.' ] ) ) #NEWLINE# record . add_field ( Field ( '730' , [ 0 , ' ' ] , subfields = [ 'a' , 'Tosefta.' , 'l' , 'English.' , 'f' , '1977.' ] ) ) #NEWLINE# record . add_field ( Field ( '600' , [ 1 , 0 ] , subfields = [ 'a' , 'Le Peu, Pepe.' ] ) ) #NEWLINE# self . assertEquals ( len ( record . subjects ( ) ) , 2 ) #NEWLINE# self . assertEquals ( record . subjects ( ) [ 0 ] . __str__ ( ) , subject1 ) #NEWLINE# self . assertEquals ( record . subjects ( ) [ 1 ] . __str__ ( ) , subject2 ) #NEWLINE# rshlist = [ rsh . __str__ ( ) for rsh in record . subjects ( ) ] #NEWLINE# self . assertEquals ( shlist , rshlist )