25 lines
488 B
Python
25 lines
488 B
Python
import requests
|
|
import pytest
|
|
|
|
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()
|
|
nordnet = investbank_nordnet.NordnetDepoFetcher(
|
|
session,
|
|
secrets.NORDNET_USERNAME,
|
|
secrets.NORDNET_PASSWORD,
|
|
)
|
|
|
|
depo = nordnet.get_depo()
|
|
assert depo is not None
|