1
0
fin-depo/test/test_kraken.py

24 lines
458 B
Python
Raw Normal View History

2024-07-20 18:19:52 +00:00
import pytest
import requests
2024-07-21 09:09:49 +00:00
import fin_depo
2024-07-20 18:19:52 +00:00
from . import secrets
needs_secrets = pytest.mark.skipif(
not secrets.KRAKEN_KEY,
reason='Secret kraken_USERNAME required',
)
2024-07-20 18:21:50 +00:00
2024-07-20 18:19:52 +00:00
@needs_secrets
def test_get_depo():
session = requests.Session()
2024-07-21 09:09:49 +00:00
fetcher = fin_depo.defi_kraken.KrakenDepoFetcher(
2024-07-20 18:19:52 +00:00
secrets.KRAKEN_KEY,
secrets.KRAKEN_SECRET,
)
depo = fetcher.get_depo()
2024-07-21 09:09:49 +00:00
assert isinstance(depo, fin_depo.data.DepoSingle)