Add url_name parameter to TestCase.create_http_request

Review Request #12823 — Created Feb. 3, 2023 and submitted — Latest diff uploaded

Information

Review Board
release-6.x

Reviewers

In order to be able to use create_http_request for tests related to
URL names (for example, extensions or actions that use apply_to), we
need to set the URL name on the ResolverMatch. This adds a parameter
to the test helper to let us set that.

This also fixes up usage with local sites, where we were setting
Request.local_site but not Request._local_site_name.

Testing Done:
Used in conjunction with other changes.

More testcase

Used in conjunction with other changes.

Diff Revision 2

This is not the most recent revision of the diff. The latest diff is revision 3. See what's changed.

orig
1
2
3

Commits

First Last Summary ID Author
Add url_name parameter to TestCase.create_http_request
In order to be able to use `create_http_request` for tests related to URL names (for example, extensions or actions that use `apply_to`), we need to set the URL name on the `ResolverMatch`. This adds a parameter to the test helper to let us set that. This also fixes up usage with local sites, where we were setting `Request.local_site` but not `Request._local_site_name`. Testing Done: Used in conjunction with other changes. More testcase
cc0131a8be2f81710643cf96044744ed27704a33 David Trowbridge
reviewboard/testing/testcase.py
Loading...