1
0
fin-depo/test/test_nordnet.py

25 lines
488 B
Python

import pytest
import requests
from fin_depo import investbank_nordnet
from . import secrets
needs_secrets = pytest.mark.skipif(
not secrets.NORDNET_USERNAME,
reason='Secret NORDNET_USERNAME required',
)
@needs_secrets
def test_get_depo():
session = requests.Session()
fetcher = investbank_nordnet.NordnetDepoFetcher(
session,
secrets.NORDNET_USERNAME,
secrets.NORDNET_PASSWORD,
)
depo = fetcher.get_depo()
assert depo is not None