1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Fixed #14611 -- Added query_params argument to RequestFactory and Client classes.

This commit is contained in:
Tom Carrick
2023-11-05 16:41:16 +01:00
committed by Mariusz Felisiak
parent e76cc93b01
commit a03593967f
6 changed files with 434 additions and 82 deletions

View File

@@ -1197,6 +1197,10 @@ class QueryStringTests(SimpleTestCase):
self.assertEqual(response.context["get-foo"], "whiz")
self.assertIsNone(response.context["post-foo"])
response = self.client.post("/request_data/", query_params={"foo": "whiz"})
self.assertEqual(response.context["get-foo"], "whiz")
self.assertIsNone(response.context["post-foo"])
# POST data provided in the URL augments actual form data
response = self.client.post("/request_data/?foo=whiz", data={"foo": "bang"})
self.assertEqual(response.context["get-foo"], "whiz")