ó
i4Vdc           @   s@   d  Z  d d l m Z d d l m Z d e f d „  ƒ  YZ d S(   s   
Backend for test environment.
iÿÿÿÿ(   t   mail(   t   BaseEmailBackendt   EmailBackendc           B   s    e  Z d  Z d „  Z d „  Z RS(   sí   A 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         O   s8   t  t |  ƒ j | | Ž  t t d ƒ s4 g  t _ n  d  S(   Nt   outbox(   t   superR   t   __init__t   hasattrR    R   (   t   selft   argst   kwargs(    (    sn   /var/www/html/phendo-backend/phendo_python/env/lib/python2.7/site-packages/django/core/mail/backends/locmem.pyR      s    c         C   s?   d } x" | D] } | j  ƒ  | d 7} q Wt j j | ƒ | S(   s%   Redirect messages to the dummy outboxi    i   (   t   messageR    R   t   extend(   R   t   messagest	   msg_countR
   (    (    sn   /var/www/html/phendo-backend/phendo_python/env/lib/python2.7/site-packages/django/core/mail/backends/locmem.pyt   send_messages   s    
(   t   __name__t
   __module__t   __doc__R   R   (    (    (    sn   /var/www/html/phendo-backend/phendo_python/env/lib/python2.7/site-packages/django/core/mail/backends/locmem.pyR   	   s   	N(   R   t   django.coreR    t   django.core.mail.backends.baseR   R   (    (    (    sn   /var/www/html/phendo-backend/phendo_python/env/lib/python2.7/site-packages/django/core/mail/backends/locmem.pyt   <module>   s   