def test_server_set_cookie_on_redirect_same_domain(tmp_path, httpbin, session):
    """Server set cookies ARE persisted on the same domain when they are forwarded."""
    session_args = []
    if session:
        session_args.extend([
            '--session',
            str(tmp_path / 'session.json')
        ])
    r = http(
        '--follow',
        *session_args,
        httpbin + '/cookies/set/a/b',
    )
    assert r.json['cookies'] == {'a': 'b'}
Server set cookies ARE persisted on the same domain when they are forwarded.
tests/test_cookie_on_redirects.py