Fix WebHook dispatch for local sites

Review Request #8229 — Created June 10, 2016 and submitted

Information

Review Board
release-2.5.x
2e2c3c4...

Reviewers

WebHooks dispatched from events triggered from local sites would fail
because the WebAPIEncoder would not have access to the local site to
complete local_site_reverse calls. We now pass in the name of the
local site to our FakeHTTPRequest class and store it on the instance
where local_site_reverse can find it. New unit tests have been added
to test each signal that triggers WebHook dispatch with a local site.

  • Saw that WebHooks fired when creating and updating review requests for
    local sites.
  • Ran unit tests.
Description From Last Updated

Col: 1 W293 blank line contains whitespace

reviewbotreviewbot

redefinition of unused 'test_review_published' from line 1729

reviewbotreviewbot

local variable 'local_site_name' is assigned to but never used

reviewbotreviewbot
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/notifications/webhooks.py
        reviewboard/notifications/tests.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/notifications/webhooks.py
        reviewboard/notifications/tests.py
    
    
  2. reviewboard/notifications/tests.py (Diff revision 1)
     
     
    Show all issues
    Col: 1
     W293 blank line contains whitespace
    
  3. reviewboard/notifications/tests.py (Diff revision 1)
     
     
    Show all issues
     redefinition of unused 'test_review_published' from line 1729
    
  4. reviewboard/notifications/webhooks.py (Diff revision 1)
     
     
    Show all issues
     local variable 'local_site_name' is assigned to but never used
    
  5. 
      
brennie
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/notifications/webhooks.py
        reviewboard/notifications/tests.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/notifications/webhooks.py
        reviewboard/notifications/tests.py
    
    
  2. 
      
david
  1. Ship It!
  2. 
      
chipx86
  1. Ship It!
  2. 
      
brennie
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-2.5.x (6aa3d5d)
Loading...