Skip to content

Commit

Permalink
tests: add moex data provider test
Browse files Browse the repository at this point in the history
  • Loading branch information
cdump committed Jan 9, 2022
1 parent 40e34fc commit f1c4f60
Showing 1 changed file with 14 additions and 0 deletions.
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

0 comments on commit f1c4f60

Please sign in to comment.