'Tests that while in debug mode, an exception is raised with a warning
when a failed attempt is made to POST 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):

    request = self._get_request(u'slash')
    request.method = u'POST'
    with six.assertRaisesRegex(self, RuntimeError, u'end    in    a    slash'):
        CommonMiddleware().process_request(request)
