summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAnurag Verma <78868769+anurag629@users.noreply.github.com>2026-02-26 23:56:55 +0530
committerGitHub <noreply@github.com>2026-02-26 13:26:55 -0500
commitd4ab33af061c13e290b6996756b2c72578891285 (patch)
tree4fbb4e2a891ef1d76c2fd3a70af63c6c7f5d0779 /tests
parent1f2a56567c565d91d797b8a9071ff77a75b52080 (diff)
Fixed #22079 -- Added tests for stripping empty list values in RequestFactory.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_client/tests.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/test_client/tests.py b/tests/test_client/tests.py
index 2c2e394b20..211b5d9e6f 100644
--- a/tests/test_client/tests.py
+++ b/tests/test_client/tests.py
@@ -1192,8 +1192,11 @@ class RequestFactoryTest(SimpleTestCase):
for method in tests:
with self.subTest(method=method):
factory = getattr(self.request_factory, method)
- request = factory("/somewhere", query_params={"example": "data"})
+ request = factory(
+ "/somewhere", query_params={"example": "data", "empty": []}
+ )
self.assertEqual(request.GET["example"], "data")
+ self.assertNotIn("empty", request.GET)
@override_settings(ROOT_URLCONF="test_client.urls")