'The token may be passed in a header instead of in the form.'

def test_csrf_token_in_header(self):

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