#NEWLINE# def __init__( self , standalones , members , mongoses , ismaster_hosts = None , * args , **kwargs ) : #NEWLINE# #INDENT# "A MongoClient connected to the default server, with a mock topology.\n\n        standalones, members, mongoses determine the configuration of the\n        topology. They are formatted like ['a:1', 'b:2']. ismaster_hosts\n        provides an alternative host list for the server's mocked ismaster\n        response; see test_connect_with_internal_ips.\n        " #NEWLINE# self . mock_standalones = args [ : ] #NEWLINE# self . mock_members = members [ : ] #NEWLINE# if self . mock_members : #NEWLINE# #INDENT# self . mock_primary = self . mock_members [ 0 ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . mock_primary = None #NEWLINE# #UNINDENT# if ( ismaster_hosts is not None ) : #NEWLINE# #INDENT# self . mock_ismaster_hosts = ismaster_hosts #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . mock_ismaster_hosts = members [ : ] #NEWLINE# #UNINDENT# self . mock_mongoses = mongoses [ : ] #NEWLINE# self . mock_down_hosts = [ ] #NEWLINE# self . mock_wire_versions = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# self . mock_max_write_batch_sizes = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# self . mock_rtts = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# kwargs [ '_pool_class' ] = partial ( MockPool , self ) #NEWLINE# kwargs [ '_monitor_class' ] = partial ( MockMonitor , self ) #NEWLINE# super ( MockClient , self ) . __init__ ( * args , ** kwargs )