()
| 53 | |
| 54 | |
| 55 | def test_multiple_set_cookie(): |
| 56 | jar = http.cookiejar.CookieJar() |
| 57 | headers = [ |
| 58 | ( |
| 59 | b"Set-Cookie", |
| 60 | b"1P_JAR=2020-08-09-18; expires=Tue, 08-Sep-2099 18:33:35 GMT; " |
| 61 | b"path=/; domain=.example.org; Secure", |
| 62 | ), |
| 63 | ( |
| 64 | b"Set-Cookie", |
| 65 | b"NID=204=KWdXOuypc86YvRfBSiWoW1dEXfSl_5qI7sxZY4umlk4J35yNTeNEkw15" |
| 66 | b"MRaujK6uYCwkrtjihTTXZPp285z_xDOUzrdHt4dj0Z5C0VOpbvdLwRdHatHAzQs7" |
| 67 | b"7TsaiWY78a3qU9r7KP_RbSLvLl2hlhnWFR2Hp5nWKPsAcOhQgSg; expires=Mon, " |
| 68 | b"08-Feb-2099 18:33:35 GMT; path=/; domain=.example.org; HttpOnly", |
| 69 | ), |
| 70 | ] |
| 71 | request = httpx.Request("GET", "https://www.example.org") |
| 72 | response = httpx.Response(200, request=request, headers=headers) |
| 73 | |
| 74 | cookies = httpx.Cookies(jar) |
| 75 | cookies.extract_cookies(response) |
| 76 | |
| 77 | assert len(cookies) == 2 |
| 78 | |
| 79 | |
| 80 | def test_cookies_can_be_a_list_of_tuples(): |
nothing calls this directly
no test coverage detected