Always lowercase and strip e-mail addresses for gravatar URL computation

Review Request #9445 — Created Dec. 15, 2017 and submitted

Barret Rennie
Djblets
release-1.0.x
f01c6bb...
djblets

We now always strip whitespace and lowercase e-mails inside
get_gravatar_url_for_email, instead of having the logic inside of
get_gravatar_url. This will ensure that e-mail hashes are always
generated correctly.

Ran unit tests.

  • 0
  • 0
  • 7
  • 0
  • 7
Description From Last Updated
Christian Hammond
  1. 
      
  2. djblets/gravatars/__init__.py (Diff revision 1)
     
     
     
     
     

    One group, and alphabetical.

  3. djblets/gravatars/__init__.py (Diff revision 1)
     
     
     
     
     
     

    We should normalize first, and then check if email is falsy (instead of just None).

  4. djblets/gravatars/__init__.py (Diff revision 1)
     
     
     

    This can be combined.

  5. djblets/gravatars/tests.py (Diff revision 1)
     
     
     

    No blank line here.

  6. djblets/gravatars/tests.py (Diff revision 1)
     
     
     

    Ending paren should be on the previous line.

    Same with others further down.

  7. djblets/gravatars/tests.py (Diff revision 1)
     
     
     

    Can you make this one line?

  8. djblets/gravatars/tests.py (Diff revision 1)
     
     
     
     
     

    Ending paren should be on the last attribute, which shouldn't have a comma.

    These can also start right after create_user(.

    Same with calls below.

  9. 
      
Barret Rennie
David Trowbridge
  1. Ship It!
  2. 
      
Christian Hammond
  1. Ship It!
  2. 
      
Barret Rennie
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-1.0.x (78ced0d)
Loading...