





'''simple docstring'''

from unittest.mock import Mock, patch

from file_transfer.send_file import send_file





@patch("socket.socket"			)
@patch("builtins.open"			)
def 		UpperCamelCase							(				_lowerCamelCase   :   Optional[int]		,			_lowerCamelCase   :   int			):
    # ===== initialization =====
    A__							=     Mock()
    A__							=     conn, Mock()
    A__							=     iter([1, None]			)
    A__							=     lambda _lowerCamelCase			: next(_lowerCamelCase			)

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

    # ===== 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 (
    OptionalDependencyNotAvailable,
    is_torch_available,
    is_transformers_available,
    is_transformers_version,
)


try:
  if not (is_transformers_available() and is_torch_available()):
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  from ...utils.dummy_torch_and_transformers_objects import KandinskyPipeline, KandinskyPriorPipeline
else:
  from .pipeline_kandinsky import KandinskyPipeline
  from .pipeline_kandinsky_imgaimg import KandinskyImgaImgPipeline
  from .pipeline_kandinsky_inpaint import KandinskyInpaintPipeline
  from .pipeline_kandinsky_prior import KandinskyPriorPipeline, KandinskyPriorPipelineOutput
  from .text_encoder import MultilingualCLIP



