@authenticated_user_fixtures
def test_authenticated_user_does_not_invalidate_session_if_not_authenticated(
        authn_policy, get_user):
    request = testing.DummyRequest()
    request.current_route_url = lambda: '/'
    request.session.invalidate = mock.Mock()
    authn_policy.authenticated_userid.return_value = None
    get_user.return_value = None

    accounts.authenticated_user(request)

    assert not request.session.invalidate.called
Extracts object ID.
dataset/ETHPy150Open hypothesis/h/h/accounts/test/__init___test.py/test_authenticated_user_does_not_invalidate_session_if_not_authenticated--crossover with--dataset/ETHPy150Open openstack/python-cloudkittyclient/cloudkittyclient/common/base.py/getid