'Non-ASCII cookies set in JavaScript are properly decoded (#20557).'

def test_non_ascii_cookie(self):

    environ = RequestFactory().get('/').environ
    raw_cookie = 'want="caf\xc3\xa9"'.encode('utf-8').decode('iso-8859-1')
    environ['HTTP_COOKIE'] = raw_cookie
    request = WSGIRequest(environ)
    self.assertEqual(request.COOKIES['want'], 'caf\xc3\xa9')
