Use display_id when forming URLs in search tests.

Review Request #12016 — Created Jan. 27, 2022 and submitted

Information

Review Board
master

Reviewers

The search tests have a bunch of test cases that were querying URLs
based on the local_id field. For some of these, the test is checking
that a review request on the global site does not show up when searching
within a local site. In these cases, the local_id field can be None,
which now causes a reverse lookup error (before it ended up just
sticking "None" in for the ID, which used to give us a URL but didn't
make sense).

I've changed all the test cases to instead use the display_id field
when creating API URLs within the tests.

Ran unit tests.

Summary ID
Use display_id when forming URLs in search tests.
The search tests have a bunch of test cases that were querying URLs based on the `local_id` field. For some of these, the test is checking that a review request on the global site does not show up when searching within a local site. In these cases, the `local_id` field can be `None`, which now causes a reverse lookup error (before it ended up just sticking "None" in for the ID, which used to give us a URL but didn't make sense). I've changed all the test cases to instead use the `display_id` field when creating API URLs within the tests. Testing Done: Ran unit tests.
b823ca2bc95b30d0c6002b3e7629c839f6cdfab5
chipx86
  1. Ship It!
  2. 
      
david
Review request changed
Status:
Completed
Change Summary:
Pushed to django-3.2 (4598791)