'HTTP PUT and DELETE can get through with X-CSRFToken and a cookie.'

def test_put_and_delete_allowed(self):

    req = self._get_GET_csrf_cookie_request()
    req.method = 'PUT'
    req.META['HTTP_X_CSRFTOKEN'] = self._csrf_id
    req2 = CsrfViewMiddleware().process_view(req, post_form_view, (), {})
    self.assertIsNone(req2)
    req = self._get_GET_csrf_cookie_request()
    req.method = 'DELETE'
    req.META['HTTP_X_CSRFTOKEN'] = self._csrf_id
    req2 = CsrfViewMiddleware().process_view(req, post_form_view, (), {})
    self.assertIsNone(req2)
