#NEWLINE# def mock_response_write( c , frame_type , data ) : #NEWLINE# #INDENT# body_size = ( 4 + len ( frame_type ) ) #NEWLINE# body_size_packed = struct . pack ( '>l' , body_size ) #NEWLINE# frame_type_packed = struct . pack ( '>l' , frame_type ) #NEWLINE# mock_write ( c , ( ( body_size_packed + frame_type_packed ) + data ) )