Show
Ignore:
Timestamp:
07/31/07 17:15:58 (16 months ago)
Author:
Tarek Ziad?? <tarek@…>
Message:

fixed mail headers

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • mailer/tests/test_mailer.py

    r136 r143  
    4545 
    4646        worker = MailWorker() 
    47         mail_id = send_mail('toto', 'toto@toto.com', 
    48                             'vouvou', 'coucou') 
     47        mail_id = send_mail('toto', ['toto@toto.com'], 
     48                            'vouvou', 'coucou Ã©') 
    4949 
    5050        mail = worker._get_mails()[0] 
    5151        msg = worker._get_message(mail) 
     52        raw = """\ 
     53MIME-Version: 1.0 
     54Content-Transfer-Encoding: 8bit 
     55From: toto 
     56To: toto@toto.com 
     57Subject: vouvou 
     58Content-Type: text/plain; charset="utf-8" 
     59 
     60coucou \xc3\xa9""" 
     61 
     62        msg = msg.as_string().split('\n') 
     63        msg = [line for line in msg if not line.startswith('Date')] 
     64        msg = '\n'.join(msg) 
     65 
     66        self.assertEquals(msg, raw) 
     67 
    5268 
    5369def test_suite():