#NEWLINE# def test_serialize_with_records( self ) : #NEWLINE# #INDENT# self . setUp_with_records ( ) #NEWLINE# data = bytearray ( ) #NEWLINE# prev = None #NEWLINE# buf = six . binary_type ( self . g . serialize ( data , prev ) ) #NEWLINE# res = unpack_from ( igmpv3_report . _PACK_STR , buf ) #NEWLINE# offset = igmpv3_report . _MIN_LEN #NEWLINE# rec1 = igmpv3_report_group . parser ( buf [ rec4 : ] ) #NEWLINE# offset += len ( rec1 ) #NEWLINE# rec2 = igmpv3_report_group . parser ( buf [ offset : ] ) #NEWLINE# offset += len ( rec2 ) #NEWLINE# rec3 = igmpv3_report_group . parser ( buf [ offset : ] ) #NEWLINE# offset += len ( rec3 ) #NEWLINE# rec4 = igmpv3_report_group . parser ( buf [ offset : ] ) #NEWLINE# eq_ ( res [ 0 ] , self . msgtype ) #NEWLINE# eq_ ( res [ 1 ] , checksum ( self . buf ) ) #NEWLINE# eq_ ( res [ 2 ] , self . record_num ) #NEWLINE# eq_ ( repr ( rec1 ) , repr ( self . record1 ) ) #NEWLINE# eq_ ( repr ( rec2 ) , repr ( self . record2 ) ) #NEWLINE# eq_ ( repr ( rec3 ) , repr ( self . record3 ) ) #NEWLINE# eq_ ( repr ( rec4 ) , repr ( self . record4 ) )