mirror of https://github.com/zulip/zulip.git
python: Remove redundant parentheses.
Generated automatically by pyupgrade. Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
3665deb93a
commit
47f795ae64
|
@ -110,7 +110,7 @@ class DocPageTest(ZulipTestCase):
|
|||
def test_api_doc_endpoints(self) -> None:
|
||||
# We extract the set of /api/ endpoints to check by parsing
|
||||
# the /api/ page sidebar for links starting with /api/.
|
||||
api_page_raw = str((self.client_get("/api/").content))
|
||||
api_page_raw = str(self.client_get("/api/").content)
|
||||
ENDPOINT_REGEXP = re.compile(r"href=\"/api/\s*(.*?)\"")
|
||||
endpoint_list_set = set(re.findall(ENDPOINT_REGEXP, api_page_raw))
|
||||
endpoint_list = [f"/api/{endpoint}" for endpoint in endpoint_list_set]
|
||||
|
|
|
@ -162,11 +162,7 @@ class OpenAPIToolsTest(ZulipTestCase):
|
|||
with self.assertRaises(SchemaError, msg='Opaque object "obj"'):
|
||||
# Checks for opaque objects
|
||||
validate_schema(
|
||||
(
|
||||
test_dict["test3"]["responses"]["200"]["content"]["application/json"][
|
||||
"schema"
|
||||
]
|
||||
)
|
||||
test_dict["test3"]["responses"]["200"]["content"]["application/json"]["schema"]
|
||||
)
|
||||
finally:
|
||||
openapi_spec.openapi()["paths"].pop("testing", None)
|
||||
|
|
Loading…
Reference in New Issue