Skip to content

Commit 0ec8c6a

Browse files
2.7.0 RC1
1 parent 95b31a0 commit 0ec8c6a

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

unittest_binance_websocket_api.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -728,10 +728,22 @@ async def process_asyncio_queue(stream_id=None):
728728
time.sleep(3)
729729
self.__class__.ubwa.stop_stream(stream_id=stream_id_1)
730730

731-
def test_exceptions(self):
731+
def test_exception_streamisstopping(self):
732732
with self.assertRaises(StreamIsStopping):
733733
raise StreamIsStopping(stream_id="blah", reason="test")
734734

735+
def test_exception_streamiscrashing(self):
736+
with self.assertRaises(StreamIsCrashing):
737+
raise StreamIsCrashing(stream_id="blah", reason="test")
738+
739+
def test_exception_streamisrestarting(self):
740+
with self.assertRaises(StreamIsRestarting):
741+
raise StreamIsRestarting(stream_id="blah", reason="test")
742+
743+
def test_exception_maximumsubscriptionsexceeded(self):
744+
with self.assertRaises(MaximumSubscriptionsExceeded):
745+
raise MaximumSubscriptionsExceeded(max_subscriptions=1024)
746+
735747
def test_live_run(self):
736748
self.__class__.ubwa.get_active_stream_list()
737749
self.__class__.ubwa.get_limit_of_subscriptions_per_stream()
@@ -801,8 +813,6 @@ def test_live_run(self):
801813
channels = ['kline_1m', 'kline_5m', 'kline_15m', 'kline_30m', 'kline_1h', 'kline_12h', 'kline_1w', 'trade',
802814
'miniTicker', 'depth20']
803815

804-
self.__class__.ubwa.create_stream(False, False, stream_label="error")
805-
806816
stream_id1 = ""
807817
for channel in channels:
808818
stream_id1 = self.__class__.ubwa.create_stream(channel, markets)

0 commit comments

Comments
 (0)