'When no CSRF cookie exists, but the user has a session, check that a token
using the session cookie as a legacy CSRF cookie is accepted.'

def test_process_request_session_cookie_no_csrf_cookie_token(self):

    orig_secret_key = settings.SECRET_KEY
    settings.SECRET_KEY = self._secret_key_for_session_test
    try:
        req = self._get_POST_session_request_with_token()
        req2 = CsrfMiddleware().process_view(req, post_form_view, (), {})
        self.assertEquals(None, req2)
    finally:
        settings.SECRET_KEY = orig_secret_key
