'If no CSRF cookies is present, the middleware rejects the incoming
request. This will stop login CSRF.'

def test_process_request_no_csrf_cookie(self):

    with patch_logger('django.security.csrf', 'warning') as logger_calls:
        req = self._get_POST_no_csrf_cookie_request()
        req2 = CsrfViewMiddleware().process_view(req, post_form_view, (), {})
        self.assertEqual(403, req2.status_code)
        self.assertEqual(logger_calls[0], ('Forbidden    (%s):    ' % REASON_NO_CSRF_COOKIE))
