


'''simple docstring'''






from unittest.mock import Mock, patch

from file_transfer.send_file import send_file







@patch("""socket.socket""" )
@patch("""builtins.open""" )
def     UpperCamelCase_      (   A__ :       Any							,   A__ :       int ):
  '''simple docstring'''





  lowerCAmelCase_      :				int      =       Mock()
  lowerCAmelCase_      :				Tuple      =       conn, Mock()
  lowerCAmelCase_      :				int      =       iter([1, None] )
  lowerCAmelCase_      :				Tuple      =       lambda A__ : next(A__ )

  # ===== invoke =====
  send_file(filename="""mytext.txt"""							,   testing=A__ )

  # ===== ensurance =====
  sock.assert_called_once()
  sock.return_value.bind.assert_called_once()
  sock.return_value.listen.assert_called_once()
  sock.return_value.accept.assert_called_once()
  conn.recv.assert_called_once()

  file.return_value.__enter__.assert_called_once()
  file.return_value.__enter__.return_value.read.assert_called()

  conn.send.assert_called_once()
  conn.close.assert_called_once()
  sock.return_value.shutdown.assert_called_once()
  sock.return_value.close.assert_called_once()







'''simple docstring'''






from ..utils import DummyObject, requires_backends






class        __snake_case	(       metaclass=_SCREAMING_SNAKE_CASE):







    """simple docstring"""



    lowercase       			= ['note_seq']

    def __init__(       self   :  Tuple   ,						*lowerCamelCase   :  Optional[int]   ,						**lowerCamelCase   :  Tuple		)       ->  Any:
      requires_backends(self   ,						["""note_seq"""]		)

    @classmethod
    def __lowercase       (       cls   :  Optional[Any]   ,						*lowerCamelCase   :  List[Any]   ,						**lowerCamelCase   :  Dict		)       ->  List[Any]:
      requires_backends(cls   ,						["""note_seq"""]		)





    @classmethod
    def __lowercase       (       cls   :  Union[str, Any]   ,						*lowerCamelCase   :  Union[str, Any]   ,						**lowerCamelCase   :  List[Any]		)       ->  Optional[int]:
      requires_backends(cls   ,						["""note_seq"""]		)



