()
| 47 | @pytest.mark.asyncio |
| 48 | @pytest.mark.flaky(reruns=3, reruns_delay=2) |
| 49 | async 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 |
nothing calls this directly
no test coverage detected