mirror of https://github.com/encode/starlette.git
Black formatting
This commit is contained in:
parent
3019be01af
commit
f6d8df7b3a
|
@ -11,6 +11,7 @@ def test_request_url():
|
||||||
data = {"method": request.method, "url": request.url}
|
data = {"method": request.method, "url": request.url}
|
||||||
response = JSONResponse(data)
|
response = JSONResponse(data)
|
||||||
await response(receive, send)
|
await response(receive, send)
|
||||||
|
|
||||||
return asgi
|
return asgi
|
||||||
|
|
||||||
client = TestClient(app)
|
client = TestClient(app)
|
||||||
|
@ -223,12 +224,13 @@ def test_request_disconnect():
|
||||||
async def asgi(receive, send):
|
async def asgi(receive, send):
|
||||||
request = Request(scope, receive)
|
request = Request(scope, receive)
|
||||||
await request.body()
|
await request.body()
|
||||||
|
|
||||||
return asgi
|
return asgi
|
||||||
|
|
||||||
async def receiver():
|
async def receiver():
|
||||||
return {'type': 'http.disconnect'}
|
return {"type": "http.disconnect"}
|
||||||
|
|
||||||
scope = {'method': 'POST', 'path': '/'}
|
scope = {"method": "POST", "path": "/"}
|
||||||
asgi_callable = app(scope)
|
asgi_callable = app(scope)
|
||||||
loop = asyncio.get_event_loop()
|
loop = asyncio.get_event_loop()
|
||||||
with pytest.raises(ClientDisconnect):
|
with pytest.raises(ClientDisconnect):
|
||||||
|
|
Loading…
Reference in New Issue