Skip to content

Commit

Permalink
Fix test.
Browse files Browse the repository at this point in the history
  • Loading branch information
peterschutt authored and provinzkraut committed Jun 27, 2023
1 parent e1b7f8c commit 0caf91b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/unit/test_signature/test_parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from litestar.params import Body, Dependency, Parameter
from litestar.status_codes import HTTP_200_OK, HTTP_204_NO_CONTENT, HTTP_400_BAD_REQUEST, HTTP_500_INTERNAL_SERVER_ERROR
from litestar.testing import RequestFactory, TestClient, create_test_client
from litestar.types.empty import Empty
from litestar.types.helper_types import OptionalSequence
from litestar.utils.signature import ParsedSignature

Expand Down Expand Up @@ -73,7 +74,8 @@ def my_fn(a: int, b: str, c: Optional[bytes], d: bytes = b"123", e: Optional[dic
assert fields["b"].field_type is str
assert not fields["b"].is_optional
assert fields["c"].field_type is Optional[bytes]
assert not fields["c"].is_optional
assert fields["c"].is_optional
assert fields["c"].default_value is Empty
assert fields["d"].field_type is bytes
assert fields["d"].default_value == b"123"
assert fields["e"].field_type == Optional[dict]
Expand Down

0 comments on commit 0caf91b

Please sign in to comment.