mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 12:33:40 +00:00
doc tests: Improve check for number of /api endpoints.
I also add a better comment.
This commit is contained in:
@@ -198,9 +198,16 @@ class DocPageTest(ZulipTestCase):
|
||||
"/api/update-message": "propagate_mode",
|
||||
}
|
||||
|
||||
# Validate that the parsing logic isn't broken, since if it
|
||||
# broke, the below would become a noop.
|
||||
self.assertGreater(len(endpoint_list), 70)
|
||||
"""
|
||||
We have 110 endpoints as of June 2023. If the
|
||||
way we represent links changes, or the way we put links
|
||||
into the main /api page changes, or if somebody simply introduces
|
||||
a bug into the test, there is a danger of losing coverage,
|
||||
although this is mitigated by other factors such as line
|
||||
coverage checks. For that reason, as well as developer convenience,
|
||||
we don't make the check here super precise.
|
||||
"""
|
||||
self.assertGreater(len(endpoint_list), 100)
|
||||
|
||||
for endpoint in endpoint_list:
|
||||
url = f"/api/{endpoint}"
|
||||
|
||||
Reference in New Issue
Block a user