bbgo_origin/python/tests/test_enums.py

16 lines
379 B
Python
Raw Permalink Normal View History

2022-04-15 06:57:33 +00:00
from bbgo.enums import ChannelType
def test_channel_type_from_str():
m = {
'book': ChannelType.BOOK,
'trade': ChannelType.TRADE,
'ticker': ChannelType.TICKER,
'kline': ChannelType.KLINE,
'balance': ChannelType.BALANCE,
'order': ChannelType.ORDER,
}
for k, v in m.items():
assert ChannelType.from_str(k) == v