Format code with black

This commit is contained in:
Correl Roush 2020-12-04 13:37:25 -05:00
parent 535eaaa988
commit 2278f30be1
2 changed files with 6 additions and 4 deletions

View file

@ -117,9 +117,11 @@ class TestRequestFactory(unittest.TestCase):
request_url = f"{url}?{urlencode(parameters)}" if url else ""
parsed = urlparse(request_url)
tornado_request = HTTPServerRequest(
method="GET", uri=f"{parsed.path}?{parsed.query}")
method="GET",
uri=f"{parsed.path}?{parsed.query}",
)
tornado_request.protocol = parsed.scheme
tornado_request.host = parsed.netloc.split(':')[0]
tornado_request.host = parsed.netloc.split(":")[0]
expected = OpenAPIRequest(
full_url_pattern=url,
method="get",

View file

@ -26,8 +26,8 @@ class TornadoRequestFactory:
query_arguments = ImmutableMultiDict()
else:
path, _, _ = request.full_url().partition("?")
if path == '://':
path = ''
if path == "://":
path = ""
query_arguments = ImmutableMultiDict(
itertools.chain(
*[