@@ -824,11 +824,9 @@ async def test_init_disconnected(self):
824
824
c = await self .async_rs_or_single_client (connect = False )
825
825
self .assertEqual (c .codec_options , CodecOptions ())
826
826
c = await self .async_rs_or_single_client (connect = False )
827
- await c .aconnect ()
828
827
self .assertFalse (await c .primary )
829
828
self .assertFalse (await c .secondaries )
830
829
c = await self .async_rs_or_single_client (connect = False )
831
- await c .aconnect ()
832
830
self .assertIsInstance (c .topology_description , TopologyDescription )
833
831
self .assertEqual (c .topology_description , c ._topology ._description )
834
832
if async_client_context .is_rs :
@@ -860,17 +858,13 @@ async def test_equality(self):
860
858
self .assertTrue (async_client_context .client != c )
861
859
862
860
c1 = self .simple_client ("a" , connect = False )
863
- await c1 .aconnect ()
864
861
c2 = self .simple_client ("b" , connect = False )
865
- await c2 .aconnect ()
866
862
867
863
# Seeds differ:
868
864
self .assertNotEqual (c1 , c2 )
869
865
870
866
c1 = self .simple_client (["a" , "b" , "c" ], connect = False )
871
- await c1 .aconnect ()
872
867
c2 = self .simple_client (["c" , "a" , "b" ], connect = False )
873
- await c2 .aconnect ()
874
868
875
869
# Same seeds but out of order still compares equal:
876
870
self .assertEqual (c1 , c2 )
@@ -910,9 +904,7 @@ async def test_repr(self):
910
904
self .assertIn ("replicaset='replset'" , the_repr )
911
905
self .assertIn ("w=1" , the_repr )
912
906
self .assertIn ("wtimeoutms=100" , the_repr )
913
- await client .close ()
914
907
async with eval (the_repr ) as client_two :
915
- await client_two .aconnect ()
916
908
self .assertEqual (client_two , client )
917
909
918
910
client = self .simple_client (
@@ -934,7 +926,6 @@ async def test_repr(self):
934
926
self .assertIn ("wtimeoutms=100" , the_repr )
935
927
936
928
async with eval (the_repr ) as client_two :
937
- await client_two .aconnect ()
938
929
self .assertEqual (client_two , client )
939
930
940
931
async def test_getters (self ):
0 commit comments