
    M}bg                     P    d dl Z d dlZd dlZd dlmZ  G d dej                  ZdS )    N)Configc                   &    e Zd Zd Zd Zd Zd ZdS )	UnitTestsc                 ,    t                      | _        d S )N)r   config)selfs    h/home/e360mart.nyusoft.in/public_html/e360mart_env/lib/python3.11/site-packages/test/unit/test_config.pysetUpzUnitTests.setUp
   s    hh    c                 b   d}d}g d}d}|                      | j        j                   |                     | j        j        |           |                     | j        j        |           |                     | j        j        |           |D ]"}|                     || j        j                   #d S )Nz/inboundi  )fromattachmentsheaderstextenvelopetohtml	sender_ipzattachment-infosubjectdkimSPFcharsetszcontent-idsspam_report
spam_scoreemailzhttp://127.0.0.1:5000/inbound)	
assertTruer   
debug_modeassertEqualendpointhostportassertInkeys)r   r   r!   r#   r    keys         r	   test_initializationzUnitTests.test_initialization   s    
 
 
& /.///-x888)4000)4000 	1 	1CMM#t{/0000	1 	1r   c                    t           j        j        j        j        }d                    t          j                            t          j        	                    |                              }t          |d          5 }|                    d           d d d            n# 1 swxY w Y   t                       t          j        |           |                     t          j        d         d           d S )Nz{0}/.envwzRANDOM_VARIABLE=RANDOM_VALUERANDOM_VARIABLERANDOM_VALUE)sendgridhelpersinboundr   __file__formatospathabspathdirnameopenwriter   remover   environr   config_fileenv_file_pathfs       r	   0test_init_environment_should_set_env_from_dotenvz:UnitTests.test_init_environment_should_set_env_from_dotenv,   s    &.5>"))"'//"'//+:V:V*W*WXX-%% 	4GG2333	4 	4 	4 	4 	4 	4 	4 	4 	4 	4 	4 	4 	4 	4 	4
	-   $56GGGGGs   ;BB!$B!c                    t           j        j        j        j        }t
          j                            t
          j                            |                    dz   }t          |d          5 }|
                    d           d d d            n# 1 swxY w Y   t                       t          j        |           |                     t
          j                            d                     d S )Nz/.envr'   z1RANDOM_VARIABLE=RANDOM_VALUE=ANOTHER_RANDOM_VALUEr(   )r*   r+   r,   r   r-   r/   r0   r1   r2   r3   r4   r   r5   assertIsNoner6   getr7   s       r	   =test_init_environment_should_not_set_env_if_format_is_invalidzGUnitTests.test_init_environment_should_not_set_env_if_format_is_invalid5   s    &.5>(D(DEEO-%% 	IGGGHHH	I 	I 	I 	I 	I 	I 	I 	I 	I 	I 	I 	I 	I 	I 	I
	-   "*..):;;<<<<<s   +BBBN)__name__
__module____qualname__r
   r%   r;   r?    r   r	   r   r      sS          1 1 1>H H H= = = = =r   r   )r/   unittestsendgrid.helpers.inbound.configr*   r   TestCaser   rC   r   r	   <module>rG      sl    				  & & & & 2 2 2 2 2 24= 4= 4= 4= 4=! 4= 4= 4= 4= 4=r   