code: def test_sock_sendfile_success(self):
      sock, proto = self.prepare_socksendfile()
      ret = self.run_loop(self.loop.sock_sendfile(sock, self.file))
      sock.close()
      self.run_loop(proto.wait_closed())
  
      self.assertEqual(ret, len(self.DATA))
      self.assertEqual(proto.data, self.DATA)
      self.assertEqual(self.file.tell(), len(self.DATA))
  
imports: import asyncio
  import errno
  import os
  import socket
  import sys
  import tempfile
  import unittest
  from asyncio import base_events
  from asyncio import constants
  from unittest import mock
  from test import support
  from test.support import os_helper
  from test.support import socket_helper
  from test.test_asyncio import utils
label_desc: Use image node_id 7 for calling the SockSendfileMixin obj's underlying member method code with example usage: obj.test_sock_sendfile_success() without return types