Fix a couple bugs in TestCase.create_many_review_requests.

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

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.

Diff Revision 2 (Latest)

orig
1
2

Commits

First Last Summary ID Author
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 David Trowbridge
reviewboard/testing/testcase.py
Loading...