#NEWLINE# def test_encode_number_packet( self ) : #NEWLINE# #INDENT# pkt = packet . Packet ( packet . MESSAGE , data = 123 ) #NEWLINE# self . assertEqual ( pkt . packet_type , packet . MESSAGE ) #NEWLINE# self . assertEqual ( self . data , 123 ) #NEWLINE# self . assertFalse ( pkt . binary ) #NEWLINE# self . assertEqual ( pkt . encode ( ) , b'4123' )