'Asserts that warning was logged when request.user
was not equal to user at session'

@contextmanager
def assert_logged_for_session_user_mismatch(self, user_at_request, user_in_session):

    with self.assert_logged_with_message("SafeCookieData    user    at    request    '{}'    does    not    match    user    in    session:    '{}'".format(user_at_request, user_in_session), log_level='warning'):
        (yield)
