Applied Black

This commit is contained in:
Simon Willison 2021-01-11 13:34:38 -08:00
commit 8e8fc5cee5
2 changed files with 5 additions and 10 deletions

View file

@ -92,10 +92,7 @@ class Request:
@property
def full_path(self):
qs = self.query_string
return "{}{}".format(
self.path,
('?' + qs) if qs else ''
)
return "{}{}".format(self.path, ("?" + qs) if qs else "")
@property
def args(self):

View file

@ -92,12 +92,10 @@ def test_request_url_vars():
).url_vars
@pytest.mark.parametrize("path,query_string,expected_full_path", [
("/", "", "/"),
("/", "foo=bar", "/?foo=bar"),
("/foo", "bar", "/foo?bar")
])
@pytest.mark.parametrize(
"path,query_string,expected_full_path",
[("/", "", "/"), ("/", "foo=bar", "/?foo=bar"), ("/foo", "bar", "/foo?bar")],
)
def test_request_properties(path, query_string, expected_full_path):
scope = {
"http_version": "1.1",