summaryrefslogtreecommitdiffhomepage
path: root/test/test_asgi_application.py
diff options
context:
space:
mode:
authorDan Callahan <d.callahan@f5.com>2024-02-27 15:15:42 +0000
committerDan Callahan <d.callahan@f5.com>2024-02-27 15:15:42 +0000
commitd76761901c4084bcdbc5a449e9bbb47d56b7093c (patch)
treeb4b7b4e3d588b73a2adcc0094cab466d9194c679 /test/test_asgi_application.py
parentc43629880472bba8d389dfb0b7ae6d883b0ba499 (diff)
parent088117008c9e8f397a58cc8d8070ce047beff12f (diff)
downloadunit-d76761901c4084bcdbc5a449e9bbb47d56b7093c.tar.gz
unit-d76761901c4084bcdbc5a449e9bbb47d56b7093c.tar.bz2
Merge tag '1.32.0' into branches/packaging1.32.0-1
Unit 1.32.0 release.
Diffstat (limited to '')
-rw-r--r--test/test_asgi_application.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/test/test_asgi_application.py b/test/test_asgi_application.py
index 98d4bcd5..226a1ed7 100644
--- a/test/test_asgi_application.py
+++ b/test/test_asgi_application.py
@@ -3,6 +3,7 @@ import time
import pytest
from packaging import version
+
from unit.applications.lang.python import ApplicationPython
prerequisites = {
@@ -60,7 +61,7 @@ def test_asgi_application_ipv6():
client.load('empty')
assert 'success' in client.conf(
- {"[::1]:7080": {"pass": "applications/empty"}}, 'listeners'
+ {"[::1]:8080": {"pass": "applications/empty"}}, 'listeners'
)
assert client.get(sock_type='ipv6')['status'] == 200
@@ -172,7 +173,7 @@ def test_asgi_application_server_port():
client.load('server_port')
assert (
- client.get()['headers']['Server-Port'] == '7080'
+ client.get()['headers']['Server-Port'] == '8080'
), 'Server-Port header'
@@ -217,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')