'Non-ASCII query strings are properly decoded (#20530, #22996).'

def test_non_ascii_query_string(self):

    environ = RequestFactory().get('/').environ
    raw_query_strings = ['want=caf%C3%A9', 'want=caf\xc3\xa9', 'want=caf%E9', 'want=caf\xe9']
    got = []
    for raw_query_string in raw_query_strings:
        environ['QUERY_STRING'] = str(raw_query_string, 'iso-8859-1')
        request = WSGIRequest(environ)
        got.append(request.GET['want'])
    self.assertEqual(got, ['caf\xc3\xa9', 'caf\xc3\xa9', 'caf\\ufffd', 'caf\xc3\xa9'])
