Files
OpenBB/tests/openbb_terminal/cryptocurrency/due_diligence/test_coinpaprika_model.py
Henrique Joaquim c9be1155c2 Fix #3326 (#3425)
* removed get_coinpaprika_id from the view

* reorganized a bit

* removed unused functions

* removed unused functions

* removed unused imports

* cleaning

* cleaning

* fix tests

* fix template report

* fix template report

* fixing imports

* fixing imports

* fix report

* fix report

* fix report

* fix tests

* small fixes after merge

* linting

Co-authored-by: jose-donato <43375532+jose-donato@users.noreply.github.com>
2022-11-16 14:13:21 +00:00

40 lines
975 B
Python

# IMPORTATION STANDARD
# IMPORTATION THIRDPARTY
import pytest
# IMPORTATION INTERNAL
from openbb_terminal.cryptocurrency.due_diligence import coinpaprika_model
@pytest.fixture(scope="module")
def vcr_config():
return {
"filter_query_parameters": [
("start", "mock_start"),
("end", "mock_end"),
]
}
@pytest.mark.vcr
@pytest.mark.parametrize(
"func, kwargs",
[
("get_coin", dict()),
("get_coin_twitter_timeline", dict()),
("get_coin_events_by_id", dict()),
("get_coin_markets_by_id", dict()),
("get_tickers_info_for_coin", dict()),
("validate_coin", dict(symbol="btc", coins_dct={"btc-bitcoin": "btc"})),
("basic_coin_info", dict()),
],
)
def test_call_func(func, kwargs, recorder):
result = getattr(coinpaprika_model, func)(**kwargs)
if isinstance(result, tuple):
recorder.capture_list(result)
else:
recorder.capture(result)