Files
OpenBB/tests/openbb_terminal/cryptocurrency/test_crypto_models.py
Henrique Joaquim a37d9032e3 Hotfix/fix black (#4101)
* Fix plot look when using eval and add query to choices (#3881)

* convert index to datetime and update choices

* uncomment economy integration test

* fix treasury concat bug

* fix datasets concat on duplciates

* Lock ruff version so that new lints dont break our CI (#3905)

* Lock ruff version so that new lints dont break our CI

* Bumped pre-commit ruff version

* returning always a dataframe

* Revert "returning always a dataframe"

This reverts commit d5dbf3132f.

* black everything

---------
2023-02-01 12:33:15 +00:00

81 lines
1.4 KiB
Python

# IMPORTATION STANDARD
# IMPORTATION THIRDPARTY
import pytest
# IMPORTATION INTERNAL
from openbb_terminal.cryptocurrency import crypto_models
@pytest.mark.vcr
@pytest.mark.parametrize(
"query, source, key",
[
[
"btc",
"CoinGecko",
"id",
],
[
"bt",
"CoinGecko",
"symbol",
],
[
"doge",
"CoinGecko",
"name",
],
[
"bitcoin",
"CoinPaprika",
"id",
],
[
"bt",
"CoinPaprika",
"symbol",
],
[
"doge",
"CoinPaprika",
"name",
],
[
"btc",
"Binance",
"id",
],
[
"polka",
"Binance",
"id",
],
[
"doge",
"Binance",
"id",
],
[
"btc",
"Coinbase",
"id",
],
[
"polka",
"Coinbase",
"id",
],
[
"doge",
"Coinbase",
"id",
],
],
)
def test_find(query, source, key, recorder):
result_df = getattr(crypto_models, "find")(query=query, source=source, key=key)
assert not result_df.empty
recorder.capture(result_df)