Cache lookups of LocalSites in the API unit tests.

Review Request #6084 — Created July 8, 2014 and submitted

Information

Review Board
master
47c57e5...

Reviewers

We fetch LocalSites quite a lot in the API unit tests. This attempts to
reduce the number of queries by caching and returning them after they've
already been queried once.

Unit tests pass.

Description From Last Updated

'LocalSite' imported but unused

reviewbotreviewbot

'LocalSite' imported but unused

reviewbotreviewbot

'LocalSite' imported but unused

reviewbotreviewbot

'LocalSite' imported but unused

reviewbotreviewbot

'LocalSite' imported but unused

reviewbotreviewbot

'LocalSite' imported but unused

reviewbotreviewbot
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/testing/testcase.py
        reviewboard/webapi/tests/test_review_group.py
        reviewboard/webapi/tests/test_hosting_service_account.py
        reviewboard/webapi/tests/test_review_request.py
        reviewboard/webapi/tests/test_review_request_draft.py
        reviewboard/webapi/tests/test_default_reviewer.py
        reviewboard/webapi/tests/test_review_group_user.py
        reviewboard/webapi/tests/test_user.py
        reviewboard/webapi/tests/base.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/testing/testcase.py
        reviewboard/webapi/tests/test_review_group.py
        reviewboard/webapi/tests/test_hosting_service_account.py
        reviewboard/webapi/tests/test_review_request.py
        reviewboard/webapi/tests/test_review_request_draft.py
        reviewboard/webapi/tests/test_default_reviewer.py
        reviewboard/webapi/tests/test_review_group_user.py
        reviewboard/webapi/tests/test_user.py
        reviewboard/webapi/tests/base.py
    
    
  2. reviewboard/webapi/tests/base.py (Diff revision 1)
     
     
    Show all issues
     'LocalSite' imported but unused
    
  3. Show all issues
     'LocalSite' imported but unused
    
  4. Show all issues
     'LocalSite' imported but unused
    
  5. Show all issues
     'LocalSite' imported but unused
    
  6. Show all issues
     'LocalSite' imported but unused
    
  7. reviewboard/webapi/tests/test_user.py (Diff revision 1)
     
     
    Show all issues
     'LocalSite' imported but unused
    
  8. 
      
david
  1. Ship It!

  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to master (0b9a469)