summaryrefslogtreecommitdiffhomepage
path: root/test/python/threads/asgi.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--test/python/threads/asgi.py19
1 files changed, 11 insertions, 8 deletions
diff --git a/test/python/threads/asgi.py b/test/python/threads/asgi.py
index d51ae431..ff4e52ad 100644
--- a/test/python/threads/asgi.py
+++ b/test/python/threads/asgi.py
@@ -2,6 +2,7 @@ import asyncio
import time
import threading
+
async def application(scope, receive, send):
assert scope['type'] == 'http'
@@ -17,11 +18,13 @@ async def application(scope, receive, send):
time.sleep(delay)
- await send({
- 'type': 'http.response.start',
- 'status': 200,
- 'headers': [
- (b'content-length', b'0'),
- (b'x-thread', str(threading.currentThread().ident).encode()),
- ]
- })
+ await send(
+ {
+ 'type': 'http.response.start',
+ 'status': 200,
+ 'headers': [
+ (b'content-length', b'0'),
+ (b'x-thread', str(threading.currentThread().ident).encode()),
+ ],
+ }
+ )