• 
      

    Fix a couple bugs in TestCase.create_many_review_requests.

    Review Request #12687 — Created Oct. 18, 2022 and submitted

    Information

    Review Board
    release-6.x

    Reviewers

    Our helper to create multiple review requests at once had a few bugs:

    • First, the conditional for the start_local_id argument was backwards,
      setting the local ID to None when a local site was present.
    • Second, the code that went to update any existing LocalSiteProfile
      counts wasn't properly handling exceptions in the case that the profile
      does not yet exist.
    • Third, the summary wasn't being properly formatted with the index,
      leading to all review requests having the same summary "Test Summary %s"

    Ran some unit tests that made use of create_many_review_requests with
    with_local_site=True.

    Summary ID
    Fix a couple bugs in TestCase.create_many_review_requests.
    Our helper to create multiple review requests at once had two bugs when dealing with local sites. First, the conditional for the `start_local_id` argument was backwards, setting the local ID to `None`. Second, the code that went to update any existing `LocalSiteProfile` counts wasn't properly handling exceptions in the case that the profile does not yet exist. Testing Done: Ran some unit tests that made use of `create_many_review_requests` with `with_local_site=True`.
    52bef2c5280dd02ae5e6caaa683b9e1cb6f951be
    Description From Last Updated

    Just to verify, all unit tests pass with the summary change?

    chipx86chipx86
    david
    chipx86
    1. 
        
    2. Show all issues

      Just to verify, all unit tests pass with the summary change?

      1. Yup. Nothing was actually relying on that, I just noticed it while debugging my new assertQueries stuff.

    3. 
        
    david
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-6.x (d90e0b4)