original_docstring: Passing None for cookie includes no cookie.
docstring: Passing None for cookie includes no cookie.
docstring_tokens: Passing None for cookie includes no cookie .
code: def _check_bad_or_missing_cookie(self, cookie, expected):
          """Passing None for cookie includes no cookie."""
          if cookie is None:
              req = self._get_POST_no_csrf_cookie_request()
          else:
              req = self._get_POST_csrf_cookie_request(cookie=cookie)
          mw = CsrfViewMiddleware(post_form_view)
          mw.process_request(req)
          with self.assertLogs('django.security.csrf', 'WARNING') as cm:
              resp = mw.process_view(req, post_form_view, (), {})
          self.assertEqual(403, resp.status_code)
          self.assertEqual(cm.records[0].getMessage(), 'Forbidden (%s): ' % expected)
code_tokens: def _check_bad_or_missing_cookie ( self , cookie , expected ) : if cookie is None : req = self . _get_POST_no_csrf_cookie_request ( ) else : req = self . _get_POST_csrf_cookie_request ( cookie = cookie ) mw = CsrfViewMiddleware ( post_form_view ) mw . process_request ( req ) with self . assertLogs ( 'django.security.csrf' , 'WARNING' ) as cm : resp = mw . process_view ( req , post_form_view , ( ) , { } ) self . assertEqual ( 403 , resp . status_code ) self . assertEqual ( cm . records [ 0 ] . getMessage ( ) , 'Forbidden (%s): ' % expected )
short_docstring: Passing None for cookie includes no cookie.
short_docstring_tokens: Passing None for cookie includes no cookie .
comment: """Passing None for cookie includes no cookie."""