Add url_name parameter to TestCase.create_http_request
Review Request #12823 — Created Feb. 3, 2023 and submitted
In order to be able to use
create_http_requestfor tests related to
URL names (for example, extensions or actions that useapply_to), we
need to set the URL name on theResolverMatch. 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_sitebut notRequest._local_site_name.Testing Done:
Used in conjunction with other changes.More testcase
Used in conjunction with other changes.
| Summary | ID |
|---|---|
| 95a68647b6f5dc2b0023bd1e60f9b323351aae97 |
| Description | From | Last Updated |
|---|---|---|
|
do not assign a lambda expression, use a def Column: 17 Error code: E731 |
|
|
|
) -> HttpRequest should be on the next line, unindented a level. **kwargs should have a trailing comma. |
|
|
|
Can you add a Version Added for this, and a Version Changed on the method? Even though they're unit tests, … |
|
- Change Summary:
-
- Fix up warning about lambdas
- Fix a bug encountered with reverse URLs when using with_local_site=True
- Description:
-
In order to be able to use
create_http_requestfor tests related toURL names (for example, extensions or actions that use apply_to), weneed to set the URL name on the ResolverMatch. This adds a parameterto the test helper to let us set that. + + This also fixes up usage with local sites, where we were setting
+ Request.local_sitebut notRequest._local_site_name.+ + Testing Done:
+ Used in conjunction with other changes. + + More testcase
- Commits:
-
Summary ID 4275a5db3620d1f853f36f8007574d1d6f5cbefa cc0131a8be2f81710643cf96044744ed27704a33 - Diff:
-
Revision 2 (+56 -20)
Checks run (2 succeeded)
- Commits:
-
Summary ID cc0131a8be2f81710643cf96044744ed27704a33 95a68647b6f5dc2b0023bd1e60f9b323351aae97 - Diff:
-
Revision 3 (+72 -20)