﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
36966	Test client using query_params raises ValueError when following redirect	Marc Gibbons	Marc Gibbons	"When the test client is called with `query_params` and `follow=True`, a `ValueError` is raised when following the redirect.                                                                                                 
                  
`_follow_redirect` populates `data` from the redirect URL's query string via `QueryDict(url.query)`. Since `query_params` from the original request is never reset, both `data` and `query_params` end up non-empty, triggering: `ValueError: query_params and data arguments are mutually exclusive.`

Ref: https://github.com/django/django/blob/35dab0ad9ee2ed23101420cb0f253deda2818191/django/test/client.py#L998

== Reproduction ==

  {{{
  def test_follow_redirect_with_query_params(self):
      self.client.get(""/redirect_view/"", query_params={""next"": ""x""}, follow=True)  # this yells
  }}}
"	Bug	closed	Testing framework	6.0	Normal	fixed		Marc Gibbons	Ready for checkin	1	0	0	0	0	0
