MCPcopy Create free account
hub / github.com/0x676e67/wreq-python / test_set_cookie

Function test_set_cookie

tests/client_test.py:49–59  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

47@pytest.mark.asyncio
48@pytest.mark.flaky(reruns=3, reruns_delay=2)
49async def test_set_cookie():
50 url = "https://httpbin.org/cookies"
51 client = rnet.Client(cookie_store=True)
52
53 cookie = Cookie(name="foo", value="bar")
54 client.set_cookie(url, cookie)
55 assert client.get_cookies(url) == b"foo=bar"
56
57 response = await client.get(url)
58 json = await response.json()
59 assert json["cookies"] == {"foo": "bar"}
60
61
62@pytest.mark.asyncio

Callers

nothing calls this directly

Calls 5

set_cookieMethod · 0.95
get_cookiesMethod · 0.95
getMethod · 0.95
CookieClass · 0.85
jsonMethod · 0.45

Tested by

no test coverage detected