'APPEND_SLASH should append slash to path when redirecting a request
with a querystring ending with slash.'

@override_settings(APPEND_SLASH=True)
def test_append_slash_redirect_querystring_have_slash(self):

    request = self.rf.get('/slash?test=slash/')
    response = HttpResponseNotFound()
    r = CommonMiddleware().process_response(request, response)
    self.assertIsInstance(r, HttpResponsePermanentRedirect)
    self.assertEqual(r.url, '/slash/?test=slash/')
