mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-23 15:25:14 +00:00
16 lines
379 B
Python
16 lines
379 B
Python
|
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
|