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

The walk stopped after 200 commits: lines older than 5e4f54d point at it.

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

line 1why, one step back
1from httpx import AsyncClient, Cookies, Headers

Add test script (#451)Florimond Mancabefore adoption5e4f54d

lines 2–4why, one step back
2
34def test_client_headers():

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

line 5why, one step back
5 client = AsyncClient()

Add test script (#451)Florimond Mancabefore adoption5e4f54d

lines 6–11why, one step back
6 client.headers = {"a": "b"}
7 assert isinstance(client.headers, Headers)8 assert client.headers["A"] == "b"91011def test_client_cookies():

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

line 12why, one step back
12 client = AsyncClient()

Add test script (#451)Florimond Mancabefore adoption5e4f54d

lines 13–17why, one step back
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"