diff --git a/zerver/tests/test_docs.py b/zerver/tests/test_docs.py index 2af0466958..d21b82a7c9 100644 --- a/zerver/tests/test_docs.py +++ b/zerver/tests/test_docs.py @@ -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] diff --git a/zerver/tests/test_openapi.py b/zerver/tests/test_openapi.py index 12c95130e3..ec86d37407 100644 --- a/zerver/tests/test_openapi.py +++ b/zerver/tests/test_openapi.py @@ -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)