#NEWLINE# def test_socket_recv( self ) : #NEWLINE# #INDENT# chunk = 'foo' #NEWLINE# self . sock . recv = MagicMock ( return_value = chunk ) #NEWLINE# result = self . channel . _socket_recv ( ) #NEWLINE# self . assertEqual ( result , chunk ) #NEWLINE# self . sock . recv . assert_called_once_with ( self . channel . _recv_amount )