B
    ©0H[t  ã               @   s0   d Z ddlmZ ddlmZ G dd„ deƒZdS )z
Backend for test environment.
é    )Úmail)ÚBaseEmailBackendc                   s(   e Zd ZdZ‡ fdd„Zdd„ Z‡  ZS )ÚEmailBackendzó
    An email backend for use during test sessions.

    The test connection stores email messages in a dummy outbox,
    rather than sending them out on the wire.

    The dummy outbox is accessible through the outbox instance attribute.
    c                s"   t ƒ j||Ž ttdƒsg t_d S )NÚoutbox)ÚsuperÚ__init__Úhasattrr   r   )ÚselfÚargsÚkwargs)Ú	__class__© údC:\Users\HIRONO~1\AppData\Local\Temp\pip-install-6bm3nxem\django\django\core\mail\backends\locmem.pyr      s    
zEmailBackend.__init__c             C   s2   d}x(|D ] }|  ¡  tj |¡ |d7 }q
W |S )z%Redirect messages to the dummy outboxr   é   )Úmessager   r   Úappend)r	   ÚmessagesZ	msg_countr   r   r   r   Úsend_messages   s    
zEmailBackend.send_messages)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   Ú__classcell__r   r   )r   r   r   	   s   r   N)r   Zdjango.corer   Zdjango.core.mail.backends.baser   r   r   r   r   r   Ú<module>   s   