#NEWLINE# def test_too_large( self ) : #NEWLINE# #INDENT# size = ( collectd . MAX_PACKET_SIZE // 2 ) #NEWLINE# stats = [ ( ( 'X' * size ) , 123 ) , ( ( 'Y' * size ) , 321 ) ] #NEWLINE# self . conn . test . record ( ** dict ( stats ) ) #NEWLINE# collectd . take_snapshots ( ) #NEWLINE# collectd . send_stats ( raise_on_empty = True ) #NEWLINE# for ( name , val ) in stats : #NEWLINE# #INDENT# packet = self . server . recv ( collectd . MAX_PACKET_SIZE ) #NEWLINE# self . assertTrue ( ( ( name + '\x00' ) in packet ) ) #NEWLINE# self . assertTrue ( ( struct . pack ( '<d' , val ) in packet ) ) #NEWLINE# self . assertValidPacket ( 8 , packet )