'While in debug mode, an exception is raised with a warning
when a failed attempt is made to POST, PUT, or PATCH to an URL which
would normally be redirected to a slashed version.'

@override_settings(APPEND_SLASH=True, DEBUG=True)
def test_append_slash_no_redirect_on_POST_in_DEBUG(self):

    msg = 'maintaining    %s    data.    Change    your    form    to    point    to    testserver/slash/'
    request = self.rf.get('/slash')
    request.method = 'POST'
    response = HttpResponseNotFound()
    with self.assertRaisesMessage(RuntimeError, (msg % request.method)):
        CommonMiddleware().process_response(request, response)
    request = self.rf.get('/slash')
    request.method = 'PUT'
    with self.assertRaisesMessage(RuntimeError, (msg % request.method)):
        CommonMiddleware().process_response(request, response)
    request = self.rf.get('/slash')
    request.method = 'PATCH'
    with self.assertRaisesMessage(RuntimeError, (msg % request.method)):
        CommonMiddleware().process_response(request, response)
