mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-05 17:01:58 +00:00
* 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
---------
81 lines
1.4 KiB
Python
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)
|