mirror of
https://github.com/correl/tornado-openapi3.git
synced 2024-11-15 03:00:19 +00:00
Format code with black
This commit is contained in:
parent
535eaaa988
commit
2278f30be1
2 changed files with 6 additions and 4 deletions
|
@ -117,9 +117,11 @@ class TestRequestFactory(unittest.TestCase):
|
||||||
request_url = f"{url}?{urlencode(parameters)}" if url else ""
|
request_url = f"{url}?{urlencode(parameters)}" if url else ""
|
||||||
parsed = urlparse(request_url)
|
parsed = urlparse(request_url)
|
||||||
tornado_request = HTTPServerRequest(
|
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.protocol = parsed.scheme
|
||||||
tornado_request.host = parsed.netloc.split(':')[0]
|
tornado_request.host = parsed.netloc.split(":")[0]
|
||||||
expected = OpenAPIRequest(
|
expected = OpenAPIRequest(
|
||||||
full_url_pattern=url,
|
full_url_pattern=url,
|
||||||
method="get",
|
method="get",
|
||||||
|
|
|
@ -26,8 +26,8 @@ class TornadoRequestFactory:
|
||||||
query_arguments = ImmutableMultiDict()
|
query_arguments = ImmutableMultiDict()
|
||||||
else:
|
else:
|
||||||
path, _, _ = request.full_url().partition("?")
|
path, _, _ = request.full_url().partition("?")
|
||||||
if path == '://':
|
if path == "://":
|
||||||
path = ''
|
path = ""
|
||||||
query_arguments = ImmutableMultiDict(
|
query_arguments = ImmutableMultiDict(
|
||||||
itertools.chain(
|
itertools.chain(
|
||||||
*[
|
*[
|
||||||
|
|
Loading…
Reference in a new issue