#NEWLINE# def it_can_iterate_over_the_serialized_parts( self ) : #NEWLINE# #INDENT# ( partname , content_type , blob ) = ( 'part/name.xml' , 'app/vnd.type' , '<Part_1/>' ) #NEWLINE# spart = Mock ( name = 'spart' , partname = partname , content_type = content_type , blob = blob ) #NEWLINE# pkg_reader = PackageReader ( None , None , [ spart ] ) #NEWLINE# iter_count = 0 #NEWLINE# for retval in pkg_reader . iter_sparts ( ) : #NEWLINE# #INDENT# iter_count += 1 #NEWLINE# #UNINDENT# assert ( retval == ( partname , content_type , blob ) ) #NEWLINE# assert ( iter_count == 1 )