Update Review Board to use the new avatar services APIs

Review Request #8480 — Created Oct. 20, 2016 and submitted

Information

Review Board
release-3.0.x

Reviewers

This patch updates avatar services tests to use the new avatar services
registry API from r/8479. It also updates the user API and user
datagrid column to use the newer AvatarServicesRegistry.for_user
method to retrieve their preferred avatar service.

  • Ran unit tests.
  • Verified that avatar configuration still works.
  • Verified that avatar admin configuration still works.
Description From Last Updated

I think the old method was cleaner.

daviddavid

You lost a not in here.

daviddavid

Change back to use has_service?

daviddavid

You can use assertEqual. It's equivalent to assertSetEqual when passing in sets.

chipx86chipx86
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/avatars/tests.py
        reviewboard/admin/forms.py
        reviewboard/webapi/resources/user.py
        reviewboard/webapi/tests/test_user.py
        reviewboard/datagrids/columns.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/avatars/tests.py
        reviewboard/admin/forms.py
        reviewboard/webapi/resources/user.py
        reviewboard/webapi/tests/test_user.py
        reviewboard/datagrids/columns.py
    
    
  2. 
      
brennie
david
  1. 
      
  2. reviewboard/admin/forms.py (Diff revision 1)
     
     
    Show all issues

    I think the old method was cleaner.

  3. 
      
brennie
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/avatars/tests.py
        reviewboard/admin/forms.py
        reviewboard/webapi/resources/user.py
        reviewboard/webapi/tests/test_user.py
        reviewboard/datagrids/columns.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/avatars/tests.py
        reviewboard/admin/forms.py
        reviewboard/webapi/resources/user.py
        reviewboard/webapi/tests/test_user.py
        reviewboard/datagrids/columns.py
    
    
  2. 
      
david
  1. 
      
  2. reviewboard/admin/forms.py (Diff revision 2)
     
     
    Show all issues

    You lost a not in here.

  3. reviewboard/admin/forms.py (Diff revision 2)
     
     
    Show all issues

    Change back to use has_service?

  4. 
      
brennie
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/avatars/tests.py
        reviewboard/admin/forms.py
        reviewboard/webapi/resources/user.py
        reviewboard/webapi/tests/test_user.py
        reviewboard/datagrids/columns.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/avatars/tests.py
        reviewboard/admin/forms.py
        reviewboard/webapi/resources/user.py
        reviewboard/webapi/tests/test_user.py
        reviewboard/datagrids/columns.py
    
    
  2. 
      
david
  1. Ship It!
  2. 
      
chipx86
  1. 
      
  2. reviewboard/avatars/tests.py (Diff revision 3)
     
     
    Show all issues

    You can use assertEqual. It's equivalent to assertSetEqual when passing in sets.

  3. 
      
brennie
Review request changed
Status:
Completed
Change Summary:
Pushed to release-3.0.x (ef24b8d)