test_stripe: What even is how to code I don’t know help.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2021-12-22 23:44:51 -08:00 committed by Tim Abbott
parent f45b245f74
commit b73a6b7b06
1 changed files with 5 additions and 2 deletions

View File

@ -4109,9 +4109,12 @@ class RequiresBillingAccessTest(StripeTestCase):
# Make sure that we are testing all the JSON endpoints
# Quite a hack, but probably fine for now
string_with_all_endpoints = str(get_resolver("corporate.urls").reverse_dict)
reverse_dict = get_resolver("corporate.urls").reverse_dict
json_endpoints = {
word.strip("\"'()[],$") for word in string_with_all_endpoints.split() if "json/" in word
pat
for name in reverse_dict
for matches, pat, defaults, converters in reverse_dict.getlist(name)
if pat.startswith(re.escape("json/"))
}
self.assert_length(json_endpoints, len(tested_endpoints))