





from unittest.mock import Mock, patch

from file_transfer.send_file import send_file


@patch('socket.socket'						)
@patch('builtins.open'						)
def 		_SCREAMING_SNAKE_CASE     ( lowerCAmelCase__							,lowerCAmelCase__						):
		# ===== initialization =====
		lowerCamelCase_	:     Any 						=      Mock()
		lowerCamelCase_	:     Optional[int] 						=      conn, Mock()
		lowerCamelCase_	:     str 						=      iter([1, None]						)
		lowerCamelCase_	:     Optional[int] 						=      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()







_lowercase		:  Optional[Any]			       ="""
# Transformers installation
! pip install transformers datasets
# To install from source instead of the last release, comment the command above and uncomment the following one.
# ! pip install git+https://github.com/huggingface/transformers.git
"""

_lowercase		:  Union[str, Any]			       =[{"""type""": """code""", """content""": INSTALL_CONTENT}]
_lowercase		:  List[Any]			       ={
    """{processor_class}""": """FakeProcessorClass""",
    """{model_class}""": """FakeModelClass""",
    """{object_class}""": """FakeObjectClass""",
}
