#NEWLINE# def test_socket_recvfrom( self ) : #NEWLINE# #INDENT# chunk = ( 'foo' , None ) #NEWLINE# self . sock . recvfrom = MagicMock ( return_value = chunk ) #NEWLINE# result = self . channel . _socket_recvfrom ( ) #NEWLINE# self . assertEqual ( result , chunk ) #NEWLINE# self . sock . recvfrom . assert_called_once_with ( self . channel . _recv_amount )