From 697a58506235e89af1c8cc3cafc92b3d85a3467d Mon Sep 17 00:00:00 2001 From: Andrei Zeliankou Date: Fri, 26 Jan 2024 14:58:43 +0000 Subject: Python: bytearray body support for ASGI module. @filiphanes requested support for bytearray and memoryview in the request body here: This patch implements bytearray body support only. Memoryview body still need to be implemented. --- test/test_asgi_application.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test/test_asgi_application.py') diff --git a/test/test_asgi_application.py b/test/test_asgi_application.py index e6668b2f..226a1ed7 100644 --- a/test/test_asgi_application.py +++ b/test/test_asgi_application.py @@ -218,6 +218,14 @@ def test_asgi_application_shm_ack_handle(): assert resp['body'] == body, 'keep-alive 1' +def test_asgi_application_body_bytearray(): + client.load('body_bytearray') + + body = '0123456789' + + assert client.post(body=body)['body'] == body + + def test_asgi_keepalive_body(): client.load('mirror') -- cgit