Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deps upgrade #53

Merged
merged 8 commits into from
Jan 9, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
tests: add moex data provider test
  • Loading branch information
cdump committed Jan 9, 2022
commit f1c4f600a162c4f621498723c0284d7c0001e8f1
14 changes: 14 additions & 0 deletions tests/data_providers/moex_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import pytest # type: ignore

from investments.data_providers.moex import get_board_candles
from investments.ticker import Ticker, TickerKind

def test_moex_get_board_candles():
p = get_board_candles(Ticker('GAZP', TickerKind.Stock), None, start='2021-12-14', end='2021-12-14', interval=24)

# reference data from https://www.moex.com/ru/issue.aspx?code=GAZP
assert p['open'].item() == 307
assert p['close'].item() == 319.35
assert p['high'].item() == 320
assert p['low'].item() == 289.78
assert p['volume'].item() == 168689260