'Tests that HTTP PUT and DELETE methods have protection'

def test_put_and_delete_rejected(self):

    req = TestingHttpRequest()
    req.method = u'PUT'
    req2 = CsrfViewMiddleware().process_view(req, post_form_view, (), {})
    self.assertEqual(403, req2.status_code)
    req = TestingHttpRequest()
    req.method = u'DELETE'
    req2 = CsrfViewMiddleware().process_view(req, post_form_view, (), {})
    self.assertEqual(403, req2.status_code)
