U
    42‹i/  ã                   @   sL   d dl mZ zd dlZW n ek
r4   d dlZY nX G dd„ dejƒZdS )é    )Ú	SpamCheckNc                   @   s4   e Zd Zdd„ Zdd„ Zdd„ Zdd„ Zd	d
„ ZdS )Ú	UnitTestsc                 C   s.   ddddœ}t dddd}|  | ¡ |¡ d S )NTé   úhttps://www.test.com©ÚenableÚ	thresholdÚpost_to_url©r   ÚassertEqualÚget©ÚselfÚexpectedZ
spam_check© r   ú=/tmp/pip-unpacked-wheel-clku7wca/test/unit/test_spam_check.pyÚtest_spam_all_values   s    zUnitTests.test_spam_all_valuesc                 C   s*   dddœ}t ddd}|  | ¡ |¡ d S )NTé
   )r   r   r
   r   r   r   r   Útest_spam_no_url   s    
zUnitTests.test_spam_no_urlc                 C   s&   ddi}t dd}|  | ¡ |¡ d S )Nr   T)r   r
   r   r   r   r   Útest_spam_no_threshold   s    
z UnitTests.test_spam_no_thresholdc                 C   s.   ddddœ}t dddd}|  | ¡ |¡ d S )NFé   r   r   r
   r   r   r   r   Útest_has_values_but_not_enabled   s    z)UnitTests.test_has_values_but_not_enabledc                 C   s@   ddddœ}t dddd}d|_d|_d|_|  | ¡ |¡ dS )	z5Tests changing the properties of the spam check classFr   zhttps://www.testing.comr   Tr   r   N)r   r   r   r	   r   r   r   r   r   r   Útest_spam_change_properties   s    z%UnitTests.test_spam_change_propertiesN)Ú__name__Ú
__module__Ú__qualname__r   r   r   r   r   r   r   r   r   r   	   s
   r   )Z sendgrid.helpers.mail.spam_checkr   Z	unittest2ZunittestÚImportErrorZTestCaser   r   r   r   r   Ú<module>   s
   