

'''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__:					Dict		,lowerCAmelCase__:					Any   )      -> Dict:
							# ===== initialization =====
							SCREAMING_SNAKE_CASE_				=				Mock()
							SCREAMING_SNAKE_CASE_				=				conn, Mock()
							SCREAMING_SNAKE_CASE_				=				iter([1, None]   )
							SCREAMING_SNAKE_CASE_				=				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()










def        __lowerCAmelCase		(	__lowerCamelCase						:     int					, __lowerCamelCase						:     int						)	->    bool:
					return numa ^ numa < 0


if __name__ == "__main__":
				import doctest

				doctest.testmod()




