def METHOD_NAME(self, test_url, redirect_url, target_status_code=200):
    """
    Verify that if a user's session auth hash and the request's hash
    differ, the user is logged out. The URL to test and the
    expected redirect are passed in, since we want to test this
    behavior in both LMS and CMS, but the two systems have
    different URLconfs.
    """
    response = self.client.get(test_url)
    assert response.status_code == 200
    with patch.object(User, 'get_session_auth_hash', return_value='abc123'):
        response = self.client.get(test_url)
        self.assertRedirects(response, redirect_url, target_status_code=target_status_code)