Add candletype from string
This commit is contained in:
18
tests/leverage/test_candletype.py
Normal file
18
tests/leverage/test_candletype.py
Normal file
@@ -0,0 +1,18 @@
|
||||
import pytest
|
||||
|
||||
from freqtrade.enums import CandleType
|
||||
|
||||
|
||||
@pytest.mark.parametrize('input,expected', [
|
||||
('', CandleType.SPOT),
|
||||
('spot', CandleType.SPOT),
|
||||
(CandleType.SPOT, CandleType.SPOT),
|
||||
(CandleType.FUTURES, CandleType.FUTURES),
|
||||
(CandleType.INDEX, CandleType.INDEX),
|
||||
(CandleType.MARK, CandleType.MARK),
|
||||
('futures', CandleType.FUTURES),
|
||||
('mark', CandleType.MARK),
|
||||
('premiumIndex', CandleType.PREMIUMINDEX),
|
||||
])
|
||||
def test_candle_type_from_string(input, expected):
|
||||
assert CandleType.from_string(input) == expected
|
Reference in New Issue
Block a user