From: Tom Christie Date: Tue, 14 May 2019 13:35:55 +0000 (+0100) Subject: Linting X-Git-Tag: 0.3.0~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8f4abe057bb5e85adc2dc3fe683642ce9f89ada2;p=thirdparty%2Fhttpx.git Linting --- diff --git a/tests/dispatch/test_http2.py b/tests/dispatch/test_http2.py index 1c330777..e19bb1cf 100644 --- a/tests/dispatch/test_http2.py +++ b/tests/dispatch/test_http2.py @@ -3,16 +3,19 @@ import json import pytest from httpcore import Client, Response + from .utils import MockHTTP2Backend def app(request): - content = json.dumps({ - "method": request.method, - "path": request.url.path, - "body": request.content.decode(), - }).encode() - headers = {'Content-Length': str(len(content))} + content = json.dumps( + { + "method": request.method, + "path": request.url.path, + "body": request.content.decode(), + } + ).encode() + headers = {"Content-Length": str(len(content))} return Response(200, headers=headers, content=content) diff --git a/tests/dispatch/utils.py b/tests/dispatch/utils.py index c4df4b7c..8214c904 100644 --- a/tests/dispatch/utils.py +++ b/tests/dispatch/utils.py @@ -5,7 +5,14 @@ import h2.config import h2.connection import h2.events -from httpcore import AsyncioBackend, BaseReader, BaseWriter, Protocol, Request, TimeoutConfig +from httpcore import ( + AsyncioBackend, + BaseReader, + BaseWriter, + Protocol, + Request, + TimeoutConfig, +) class MockHTTP2Backend(AsyncioBackend):