summaryrefslogtreecommitdiffhomepage
path: root/test/test_asgi_application.py
diff options
context:
space:
mode:
authorAndrei Zeliankou <zelenkov@nginx.com>2022-08-16 03:12:12 +0100
committerAndrei Zeliankou <zelenkov@nginx.com>2022-08-16 03:12:12 +0100
commit6ddf14a6c10294e2200156738929014bf08f74cd (patch)
treed5963c6abea3d457ec8e0421f74f36cd771c3c7b /test/test_asgi_application.py
parentc1ae86e9301b2af332baa6d3ce2164f3e52d0f1d (diff)
downloadunit-6ddf14a6c10294e2200156738929014bf08f74cd.tar.gz
unit-6ddf14a6c10294e2200156738929014bf08f74cd.tar.bz2
Tests: added test for ASGI with UNIX socket.
Diffstat (limited to '')
-rw-r--r--test/test_asgi_application.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/test_asgi_application.py b/test/test_asgi_application.py
index 60fcffc1..534bd3c0 100644
--- a/test/test_asgi_application.py
+++ b/test/test_asgi_application.py
@@ -60,6 +60,16 @@ custom-header: BLAH
}, 'headers'
assert resp['body'] == body, 'body'
+ def test_asgi_application_unix(self, temp_dir):
+ self.load('empty')
+
+ addr = temp_dir + '/sock'
+ assert 'success' in self.conf(
+ {"unix:" + addr: {"pass": "applications/empty"}}, 'listeners'
+ )
+
+ assert self.get(sock_type='unix', addr=addr)['status'] == 200
+
def test_asgi_application_query_string(self):
self.load('query_string')