Skip to content

Commit a12e760

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent b9a2f88 commit a12e760

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

tests/test_local/test_event.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,16 @@ def test_format_http_event(app):
5050

5151
assert event["body"] == ""
5252

53+
5354
def test_format_http_event_with_non_unicode_body():
5455
# Create a request with non-unicode body
55-
non_unicode_body = b'\xff\xfe\xfd' # Invalid UTF-8 sequence
56-
builder = EnvironBuilder(method='POST', data=non_unicode_body)
56+
non_unicode_body = b"\xff\xfe\xfd" # Invalid UTF-8 sequence
57+
builder = EnvironBuilder(method="POST", data=non_unicode_body)
5758
r = Request(builder.get_environ())
5859

5960
# Call the function and check the result
6061
event = format_http_event(r)
6162

6263
assert event is not None
63-
assert 'body' in event
64-
assert event.get('isBase64Encoded', False) is False
64+
assert "body" in event
65+
assert event.get("isBase64Encoded", False) is False

0 commit comments

Comments
 (0)