#NEWLINE# def test_pack_and_unpack_packet_to_wrq( self ) : #NEWLINE# #INDENT# packet_data = '\x00\x02filename_example\x00mode_example\x00' #NEWLINE# packet = packets . unpack_packet ( packet_data ) #NEWLINE# self . assertEqual ( packet . __class__ , packets . WriteRequestPacket ) #NEWLINE# self . assertEqual ( packet . filename , 'filename_example' ) #NEWLINE# self . assertEqual ( packet . mode , 'mode_example' ) #NEWLINE# self . assertEqual ( self . options , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertEqual ( packet . pack ( ) , packet_data )