mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-06-08 15:54:10 +08:00
* example changes in slopes * change lettering size and side bar capitalization * revert back to Fira * start automatic website generation * this was autogen * add examples to slopes model * generate slopes doc * change to _index.md * allow italic formatting * fix regex * option to regenerate paths * update alt docs * fix generate * update alt * fix generate * update common * target italic only for types * format alt * format italic common * add sig indentation * update sig indent alt * update common ident * add todo * generate docstrings for all menus * fix maxdd * fix returns font size * fix keys docs * fix more docstrings * escape literal symbols * escape literal symbols * reformat keys * format opt * remove literal escape * remove another literal escape * remove another literal escape * unindent returns * update docs return unindent * add comma in last arg * fix funcs without params * fix signature * compact some code * refactor some more code * refactor some code * some final cleanup * write docstrings * change main * move futures paths * generate futures docs * add external axes references * fix typo * revert to double docstring * fix small bug * remove docs folder * generate.py in website folder * add forecast to docs * clear some warnings * fix underscore * remove cite * refresh website docs * fix forecast docstrings * fix po * fix po docs and remove italic * fix more docstrings * remove last warning * codespell * flake8 * exclude website contente from flake * noqa on optimizer * update website * fix mypy * remove setup from mypy * mypy to openbbterminal * update precommit * pylint * try to remove sdk loading issue * fix dates active command * fix crypto.change formats * fix eb formats * nonzero fix * format dates crypto.load * format supply transac * format hr altindex * format load crypto * regenerate docs * format ba trend dates * regenerate docs * format ba trend * candle defaults * fix sentiment test * remove unused import * shopt * shopt again * revert crypto helpers * test shopt * fix some tests * skip trending test * fix alcoin test * helpers * write docs * rewrite helper * fix crypto dd defaults * fix some date defaults * regenerate website * fix santiment model * fix get trending * fix more defaults * generate website * fix ftd view data default * black * regenerate website docs * regenerate docs * refactor remaining funcs * pcr doc * Checkout from main * flake8 * regenerate docs * regenerate docs * fix build Co-authored-by: Jeroen Bouma <jer.bouma@gmail.com> Co-authored-by: Colin Delahunty <72827203+colin99d@users.noreply.github.com>
43 lines
977 B
Python
43 lines
977 B
Python
import pytest
|
|
|
|
# IMPORTATION INTERNAL
|
|
from openbb_terminal.forex import polygon_model
|
|
|
|
|
|
@pytest.fixture(scope="module")
|
|
def vcr_config():
|
|
return {
|
|
"filter_query_parameters": [
|
|
("apiKey", "MOCK_API_KEY"),
|
|
]
|
|
}
|
|
|
|
|
|
@pytest.mark.vcr
|
|
@pytest.mark.parametrize(
|
|
"fx_pair,start_date,end_date",
|
|
[
|
|
("EURUSD", "2022-02-20", "2022-03-15"),
|
|
("USDEUR", "2022-02-20", "2022-03-15"),
|
|
],
|
|
)
|
|
def test_get_historical(fx_pair, start_date, end_date, recorder):
|
|
result = polygon_model.get_historical(
|
|
fx_pair=fx_pair, start_date=start_date, end_date=end_date
|
|
)
|
|
recorder.capture(result)
|
|
|
|
|
|
@pytest.mark.vcr
|
|
@pytest.mark.parametrize(
|
|
"fx_pair,start_date,end_date",
|
|
[
|
|
("BADTICKER", "2022-02-20", "2022-03-15"),
|
|
],
|
|
)
|
|
@pytest.mark.record_stdout
|
|
def test_bad_symbols(fx_pair, start_date, end_date):
|
|
polygon_model.get_historical(
|
|
fx_pair=fx_pair, start_date=start_date, end_date=end_date
|
|
)
|