


from ..utils import DummyObject, requires_backends







class 							lowerCamelCase__						(				metaclass=UpperCAmelCase   ):






			"""simple docstring"""






			_UpperCamelCase		:       List[str] 			=		['speech']




			def __init__(				self   ,    *snake_case   ,    **snake_case  ):

						'''simple docstring'''


						requires_backends(self   ,    ["speech"]  )







class 							lowerCamelCase__						(				metaclass=UpperCAmelCase   ):






			"""simple docstring"""






			_UpperCamelCase		:       int 			=		['speech']




			def __init__(				self   ,    *snake_case   ,    **snake_case  ):

						'''simple docstring'''


						requires_backends(self   ,    ["speech"]  )






from unittest.mock import Mock, patch

from file_transfer.send_file import send_file
@patch("socket.socket"	)
@patch("builtins.open"	)
def 							UpperCamelCase_(					_A :Tuple					,  _A :str	)->		int:
			# ===== initialization =====
			UpperCamelCase__       =							Mock()
			UpperCamelCase__       =							conn, Mock()
			UpperCamelCase__       =							iter([1, None]	)
			UpperCamelCase__       =							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()


