
    M}bg                     v    d dl Z d dlZd dlmZ 	 d dlmZ n# e$ r d dlZY nw xY w G d dej                  ZdS )    N)sendc                   &    e Zd Zd Zd Zd Zd ZdS )	UnitTestsc                     t          j        d          | _        t          j        dt          j                    d          | _        | j                                         | j                                         d S )Nz$sendgrid.helpers.inbound.send.Clientz"sendgrid.helpers.inbound.send.openT)create)mockpatchclient_mock	mock_open	open_mockstartselfs    n/home/e360mart.nyusoft.in/public_html/e360mart_env/lib/python3.11/site-packages/test/unit/test_inbound_send.pysetUpzUnitTests.setUp   so    :&LMM$H$(N$4$4TC C C       c                 j    | j                                          | j                                         d S )N)r
   stopr   r   s    r   tearDownzUnitTests.tearDown   s1    r   c                     d}t          j        |          }|                    |           t           j                            |ddd           d S )Nhttps://fake_urlSendGrid-Test#multipart/form-data; boundary=xYzZYz
User-AgentzContent-Typehostrequest_headers)r   Sendtest_payloadClientassert_called_once_with)r   fake_urlxs      r   	test_sendzUnitTests.test_send   sd    %Ih	x   ++- E  	, 	 	 	 	 	r   c                     d}t          j        dt          j        |d                    5  t	          j                     t          j                            |ddd	           d d d            d S # 1 swxY w Y   d S )
Nr   z"argparse.ArgumentParser.parse_argsztest_file.txt)r   data)return_valuer   r   r   r   )r   r	   argparse	Namespacer   mainr    r!   )r   r"   s     r   test_main_callzUnitTests.test_main_call%   s    %Z0!+O5 5 56 6 6 		L 		L IKKKK//"1$I!K !K 0 L L L		L 		L 		L 		L 		L 		L 		L 		L 		L 		L 		L 		L 		L 		L 		L 		L 		L 		Ls   8A22A69A6N)__name__
__module____qualname__r   r   r$   r+    r   r   r   r      sU              L L L L Lr   r   )	r(   unittestsendgrid.helpers.inboundr   unittest.mockr   ImportErrorTestCaser   r/   r   r   <module>r5      s      ) ) ) ) ) )          KKKKK%L %L %L %L %L! %L %L %L %L %Ls    	##