mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-29 13:32:08 +00:00
* Code Coverage * minor fix * Remove coverage limit check * Check code cov * removed env * Tests : fixing tests + autocompletion bug * Tests : skip a test * Linting * Tests : skip slow coins test on crypto * Added check for coverage * Remove failure test * Minor tweak * Added code coverage to base test --------- Co-authored-by: Chavithra <chavithra@gmail.com> Co-authored-by: James Maslek <jmaslek11@gmail.com>
81 lines
1.5 KiB
Python
81 lines
1.5 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",
|
|
],
|
|
# [ TOO SLOW
|
|
# "doge",
|
|
# "CoinGecko",
|
|
# "name",
|
|
# ],
|
|
[
|
|
"bitcoin",
|
|
"CoinPaprika",
|
|
"id",
|
|
],
|
|
[
|
|
"bt",
|
|
"CoinPaprika",
|
|
"symbol",
|
|
],
|
|
[
|
|
"doge",
|
|
"CoinPaprika",
|
|
"name",
|
|
],
|
|
# [ TOO SLOW
|
|
# "btc",
|
|
# "Binance",
|
|
# "id",
|
|
# ],
|
|
[
|
|
"polka",
|
|
"Binance",
|
|
"id",
|
|
],
|
|
[
|
|
"doge",
|
|
"Binance",
|
|
"id",
|
|
],
|
|
# [ TOO SLOW
|
|
# "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)
|