Skip to content
Myr

test_properties.py

This file

Path

tests/client/test_properties.py

17 lines · 494 bytes · Python

Last changed by

Rename Client to AsyncClient (with compat synonym) (#680)Florimond Mancabefore adoptione284b84

History of this file

Take it

1from httpx import AsyncClient, Cookies, Headers234def test_client_headers():5    client = AsyncClient()6    client.headers = {"a": "b"}7    assert isinstance(client.headers, Headers)8    assert client.headers["A"] == "b"91011def test_client_cookies():12    client = AsyncClient()13    client.cookies = {"a": "b"}14    assert isinstance(client.cookies, Cookies)15    mycookies = list(client.cookies.jar)16    assert len(mycookies) == 117    assert mycookies[0].name == "a" and mycookies[0].value == "b"