Skip to content

Commit

Permalink
test: adjusting cookie string parser test
Browse files Browse the repository at this point in the history
  • Loading branch information
floxay authored and provinzkraut committed Apr 7, 2024
1 parent 44018f9 commit f6c8bdb
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions tests/unit/test_parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ def test_parse_utf8_form_data() -> None:
('foo="bar=123456789&name=moisheZuchmir"', {"foo": "bar=123456789&name=moisheZuchmir"}),
("email=%20%22%2c%3b%2f", {"email": ' ",;/'}),
("foo=%1;bar=bar", {"foo": "%1", "bar": "bar"}),
("foo=bar;fizz ; buzz", {"buzz": "buzz", "fizz": "fizz", "foo": "bar"}),
(" fizz; foo= bar", {"fizz": "fizz", "foo": "bar"}),
("foo=bar;fizz ; buzz", {"buzz": "", "fizz": "", "foo": "bar"}),
(" fizz; foo= bar", {"fizz": "", "foo": "bar"}),
("foo=false;bar=bar;foo=true", {"bar": "bar", "foo": "true"}),
("foo=;bar=bar;foo=boo", {"bar": "bar", "foo": "boo"}),
(
Expand All @@ -66,14 +66,7 @@ def test_parse_utf8_form_data() -> None:
),
(
Cookie(key="abc", value="123", domain="localhost", httponly=True, secure=True).to_header(header=""),
{
"Domain": "localhost",
"Path": "/",
"SameSite": "lax",
"abc": "123",
"HttpOnly": "HttpOnly",
"Secure": "Secure",
},
{"Domain": "localhost", "Path": "/", "SameSite": "lax", "abc": "123", "HttpOnly": "", "Secure": ""},
),
),
)
Expand Down

0 comments on commit f6c8bdb

Please sign in to comment.