Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP version is not being persisted in cassete and replayed #869

Open
07pepa opened this issue Aug 29, 2024 · 0 comments
Open

HTTP version is not being persisted in cassete and replayed #869

07pepa opened this issue Aug 29, 2024 · 0 comments

Comments

@07pepa
Copy link

07pepa commented Aug 29, 2024

VCRPY does not record http version in cassete and is incapable of replaying it

following code fails running 2nd time (from cassete)

#using pytest-asyncio==0.24.0
from httpx import HttpxAsyncClient
import vcr
@pytest.mark.parametrize("http2, expected", [(True, "HTTP/2"), (False, "HTTP/1.1")])
async def test_http_version(http2, expected, master_key):
    with vcr.use_cassette(f"tests/vcr_cassettes/{expected}.yaml"):
        async with HttpxAsyncClient("https://edge.meilisearch.com", "master key", http2=http2) as client:
            response = await client.http_client.get("health")
            assert response.http_version == expected

this is unexpected

however i am aware it may not be possible to be done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant