From 6ddf14a6c10294e2200156738929014bf08f74cd Mon Sep 17 00:00:00 2001 From: Andrei Zeliankou Date: Tue, 16 Aug 2022 03:12:12 +0100 Subject: [PATCH] Tests: added test for ASGI with UNIX socket. --- test/test_asgi_application.py | 10 ++++++++++ 1 file changed, 10 insertions(+) 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')