@@ -891,8 +891,6 @@ def test_handle_reconnect(self, random, wait_for):
891
891
side_effect = [ValueError , exceptions .ConnectionError , None ]
892
892
)
893
893
_run (c ._handle_reconnect ())
894
- print (wait_for .mock .call_count ) # logging to debug #572
895
- print (wait_for .mock .call_args_list )
896
894
assert wait_for .mock .call_count == 3
897
895
assert [x [0 ][1 ] for x in asyncio .wait_for .mock .call_args_list ] == [
898
896
1.5 ,
@@ -914,8 +912,6 @@ def test_handle_reconnect_max_delay(self, random, wait_for):
914
912
side_effect = [ValueError , exceptions .ConnectionError , None ]
915
913
)
916
914
_run (c ._handle_reconnect ())
917
- print (wait_for .mock .call_count ) # logging to debug #572
918
- print (wait_for .mock .call_args_list )
919
915
assert wait_for .mock .call_count == 3
920
916
assert [x [0 ][1 ] for x in asyncio .wait_for .mock .call_args_list ] == [
921
917
1.5 ,
@@ -936,12 +932,7 @@ def test_handle_reconnect_max_attempts(self, random, wait_for):
936
932
c .connect = AsyncMock (
937
933
side_effect = [ValueError , exceptions .ConnectionError , None ]
938
934
)
939
- c .logger .setLevel ('INFO' )
940
935
_run (c ._handle_reconnect ())
941
- c .logger .setLevel ('ERROR' )
942
- print (c .reconnection_attempts )
943
- print (wait_for .mock .call_count ) # logging to debug #572
944
- print (wait_for .mock .call_args_list )
945
936
assert wait_for .mock .call_count == 2
946
937
assert [x [0 ][1 ] for x in asyncio .wait_for .mock .call_args_list ] == [
947
938
1.5 ,
@@ -957,15 +948,11 @@ def test_handle_reconnect_max_attempts(self, random, wait_for):
957
948
@mock .patch ('socketio.client.random.random' , side_effect = [1 , 0 , 0.5 ])
958
949
def test_handle_reconnect_aborted (self , random , wait_for ):
959
950
c = asyncio_client .AsyncClient (logger = True )
960
- c .logger .setLevel ('INFO' )
961
951
c ._reconnect_task = 'foo'
962
952
c .connect = AsyncMock (
963
953
side_effect = [ValueError , exceptions .ConnectionError , None ]
964
954
)
965
955
_run (c ._handle_reconnect ())
966
- c .logger .setLevel ('ERROR' )
967
- print (wait_for .mock .call_count ) # logging to debug #572
968
- print (wait_for .mock .call_args_list )
969
956
assert wait_for .mock .call_count == 2
970
957
assert [x [0 ][1 ] for x in asyncio .wait_for .mock .call_args_list ] == [
971
958
1.5 ,
@@ -1069,7 +1056,7 @@ def test_handle_eio_message(self):
1069
1056
_run (c ._handle_eio_message ('9' ))
1070
1057
1071
1058
def test_eio_disconnect (self ):
1072
- c = asyncio_client .AsyncClient ()
1059
+ c = asyncio_client .AsyncClient (reconnection = False )
1073
1060
c .namespaces = {'/' : '1' }
1074
1061
c .connected = True
1075
1062
c ._trigger_event = AsyncMock ()
@@ -1083,7 +1070,7 @@ def test_eio_disconnect(self):
1083
1070
assert not c .connected
1084
1071
1085
1072
def test_eio_disconnect_namespaces (self ):
1086
- c = asyncio_client .AsyncClient ()
1073
+ c = asyncio_client .AsyncClient (reconnection = False )
1087
1074
c .namespaces = {'/foo' : '1' , '/bar' : '2' }
1088
1075
c .connected = True
1089
1076
c ._trigger_event = AsyncMock ()
0 commit comments