Files
OpenBB/tests/openbb_terminal/cryptocurrency/test_crypto_models.py
Luqman bbeaef4732 Code Coverage (#4236)
* 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>
2023-02-17 15:59:14 +01:00

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)