Skip to content

Commit

Permalink
included 1min interval & interval tests #277
Browse files Browse the repository at this point in the history
  • Loading branch information
Alvaro Bartolome committed Jan 31, 2021
1 parent 56cab58 commit 326e911
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 17 deletions.
1 change: 1 addition & 0 deletions investpy/utils/constant.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@
}

INTERVAL_FILTERS = {
'1min': 60,
'5mins': 60*5,
'15mins': 60*15,
'30mins': 60*30,
Expand Down
29 changes: 12 additions & 17 deletions tests/test_investpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -1316,33 +1316,28 @@ def test_investpy_news():

for param in params:
investpy.economic_calendar(time_zone=param['time_zone'],
time_filter=param['time_filter'],
countries=param['countries'],
importances=param['importances'],
categories=param['categories'],
from_date=param['from_date'],
to_date=param['to_date'])
time_filter=param['time_filter'],
countries=param['countries'],
importances=param['importances'],
categories=param['categories'],
from_date=param['from_date'],
to_date=param['to_date'])


def test_investpy_technical():
"""
This function checks that investpy news retrieval functionality works as expected.
"""

params = [
{
params = list()

for interval in list(investpy.utils.constant.INTERVAL_FILTERS.keys()):
params.append({
'name': 'bbva',
'country': 'spain',
'product_type': 'stock',
'interval': 'weekly',
},
{
'name': 'bbva mi inversion rf mixta fi',
'country': 'spain',
'product_type': 'fund',
'interval': 'daily',
},
]
'interval': interval
})

for param in params:
investpy.technical_indicators(name=param['name'],
Expand Down

0 comments on commit 326e911

Please sign in to comment.