Skip to content

Commit

Permalink
bump lilya version, fix cookie data type
Browse files Browse the repository at this point in the history
  • Loading branch information
devkral committed Dec 27, 2024
1 parent d76b986 commit 22a3177
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ dependencies = [
"email-validator >=2.2.0,<3.0.0",
"itsdangerous>=2.1.2,<3.0.0",
"jinja2>=3.1.2,<4.0.0",
"lilya>=0.11.9",
"lilya>=0.11.11",
"loguru>=0.7.0,<0.8.0",
"pydantic>=2.10,<3.0.0",
"pydantic-settings>=2.0.0,<3.0.0",
Expand Down
16 changes: 8 additions & 8 deletions tests/handlers/test_to_response_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,8 @@ def test_function() -> Redirect:

cookies = response.headers.getlist("set-cookie")
assert len(cookies) == 2
assert cookies[0] == b"redirect-cookie=xyz; Path=/; SameSite=lax"
assert cookies[1] == b"general-cookie=xxx; Path=/; SameSite=lax"
assert cookies[0] == "redirect-cookie=xyz; Path=/; SameSite=lax"
assert cookies[1] == "general-cookie=xxx; Path=/; SameSite=lax"
assert response.background == background_task


Expand Down Expand Up @@ -266,8 +266,8 @@ def test_function() -> File:

cookies = response.headers.getlist("set-cookie")
assert len(cookies) == 3
assert cookies[0] == b"file-cookie=xyz; Path=/; SameSite=lax"
assert cookies[1] == b"general-cookie=xxx; Path=/; SameSite=lax"
assert cookies[0] == "file-cookie=xyz; Path=/; SameSite=lax"
assert cookies[1] == "general-cookie=xxx; Path=/; SameSite=lax"
assert response.background == background_task


Expand Down Expand Up @@ -317,8 +317,8 @@ def test_function() -> Stream:

cookies = response.headers.getlist("set-cookie")
assert len(cookies) == 3
assert cookies[0] == b"streaming-cookie=xyz; Path=/; SameSite=lax"
assert cookies[1] == b"general-cookie=xxx; Path=/; SameSite=lax"
assert cookies[0] == "streaming-cookie=xyz; Path=/; SameSite=lax"
assert cookies[1] == "general-cookie=xxx; Path=/; SameSite=lax"
assert response.background == background_task
else:
with pytest.raises(ValidationError):
Expand Down Expand Up @@ -356,6 +356,6 @@ def test_function() -> Template:

cookies = response.headers.getlist("set-cookie")
assert len(cookies) == 2
assert cookies[0] == b"template-cookie=xyz; Path=/; SameSite=lax"
assert cookies[1] == b"general-cookie=xxx; Path=/; SameSite=lax"
assert cookies[0] == "template-cookie=xyz; Path=/; SameSite=lax"
assert cookies[1] == "general-cookie=xxx; Path=/; SameSite=lax"
assert response.background == background_task

0 comments on commit 22a3177

Please sign in to comment.