-
Notifications
You must be signed in to change notification settings - Fork 0
/
verification.py
31 lines (26 loc) · 997 Bytes
/
verification.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
from istacpy.indicators.lite import indicators
from entrypoints import ENTRYPOINTS_TESTING_CALLS
def verify_indicators():
'''Verify all available indicator codes using the istacpy lite module'''
failing_entrypoints = []
all_indicators = indicators.get_indicators()
for indicator_code, _ in all_indicators:
try:
indicator = indicators.get_indicator(indicator_code)
indicator.get_data()
except Exception:
failing_entrypoints.append(
indicator.api_response.get('selfLink', indicator_code)
)
return failing_entrypoints
def verify_entrypoints():
'''Verify a bunch of entrypoints using different arguments on each call'''
failing_entrypoints = []
for item in ENTRYPOINTS_TESTING_CALLS:
f = item[0]
args = item[1]
try:
f(**args)
except Exception as err:
failing_entrypoints.append(err.requested_url)
return failing_entrypoints