mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-28 21:12:16 +00:00
* 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 * split find into view and model * added tests for view * add tests to model * black * unused import * disbale import oustise top level * removed view from sdk * added example
82 lines
1.4 KiB
Python
82 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)
|