Skip to content

Commit

Permalink
Test for pre-quoted cookies.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dreamsorcerer committed Jan 11, 2021
1 parent 025d940 commit 296b421
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/test_cookiejar.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,13 +292,17 @@ async def test_domain_filter_ip_cookie_receive(cookies_to_receive: Any) -> None:
("custom-cookie=value/one;", 'Cookie: custom-cookie="value/one"', True),
("custom-cookie=value1;", "Cookie: custom-cookie=value1", True),
("custom-cookie=value/one;", "Cookie: custom-cookie=value/one", False),
('foo="quoted_value"', 'Cookie: foo="quoted_value"', True),
('foo="quoted_value"; domain=127.0.0.1', 'Cookie: foo="quoted_value"', True),
],
ids=(
"IP domain preserved",
"no shared cookie",
"quoted cookie with special char",
"quoted cookie w/o special char",
"unquoted cookie with special char",
"pre-quoted cookie",
"pre-quoted cookie with domain",
),
)
async def test_quotes_correctly_based_on_input(
Expand Down

0 comments on commit 296b421

Please sign in to comment.