Issue 1502: Plain-text review request e-mails should use the full name in the signature

Review Request #2062 — Created Jan. 22, 2011 and submitted

Information

Review Board

Reviewers

added the last_name line to review_request_email. Then modified the associated unit test in test.py to test the change.

 
chipx86
  1. 
      
  2. reviewboard/notifications/tests.py (Diff revision 1)
     
     
    Built-in Python modules should always be at the top of the import list.
    
    Imports live in three groups, each separated by a blank line:
    
    1) Built-in Python modules
    2) Third-party Python modules not part of the current project
    3) Python modules part of the current project.
    
    They should be alphabetical.
  3. reviewboard/notifications/tests.py (Diff revision 1)
     
     
     
    When doing string comparisons against "", you can do:
    
    if not review_request.submitter.first_name:
    
    You probably don't want this check, though. We want to verify the text regardless.
  4. reviewboard/notifications/tests.py (Diff revision 1)
     
     
     
    "signature"
    
    lines should always be less than 80 columns long.
    
    However, you shouldn't deal with with first_name and last_name themselves. Since the e-mail template may also generate a username, what you really want is our utility function, user_displayname.
    
    For that, you'll have to do:
    
    from djblets.util.templatetags.djblets_utils import user_displayname
    
    ...
    
    signature = 'Thanks.\n\n%s' % user_displayname(review_request.submitter)
  5. This whole line should actually be:
    
    {{review_request.submitter|user_displayname}}
  6. 
      
Loading...