Ensure e-mail headers are binary type

Review Request #7612 — Created Aug. 26, 2015 and submitted

Information

Djblets
master

Reviewers

String literals are unicode by default so including headers from string
literals will result in unicode headers, which will result in unhappy
e-mails. We now ensure that e-mail headers are added to messages as a
binary type.

Unit tests have been updated to be more thorough about checking for
error states.

Ran unit tests.

Description From Last Updated

Rather than this, you probably want to do this in tests: with self.settings(EMAIL_BACKEND=...): ...

chipx86chipx86
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        djblets/mail/tests.py
        djblets/mail/message.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        djblets/mail/tests.py
        djblets/mail/message.py
    
    
  2. 
      
chipx86
  1. 
      
  2. djblets/mail/tests.py (Diff revision 1)
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
    Show all issues

    Rather than this, you probably want to do this in tests:

    with self.settings(EMAIL_BACKEND=...):
        ...
    
  3. 
      
brennie
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        djblets/mail/tests.py
        djblets/mail/message.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        djblets/mail/tests.py
        djblets/mail/message.py
    
    
  2. 
      
chipx86
  1. Ship It!
  2. 
      
brennie
Review request changed
Status:
Completed
Change Summary:
Pushed to release-0.9.x (d4265fe)