def METHOD_NAME(self):
    self.sock.buffer_writes = True
    data = mock.Mock()
    data.__len__ = mock.Mock(return_value=42)
    ret = self.sock.send(data)
    self.raw_sock.send.assert_not_called()
    self.assertEqual(ret, 42)