'A MongoClient connected to the default server, with a mock topology.
standalones, members, mongoses determine the configuration of the
topology. They are formatted like [\'a:1\', \'b:2\']. ismaster_hosts
provides an alternative host list for the server\'s mocked ismaster
response; see test_connect_with_internal_ips.'

def __init__(self, standalones, members, mongoses, ismaster_hosts=None, *args, **kwargs):

    self.mock_standalones = standalones[:]
    self.mock_members = members[:]
    if self.mock_members:
        self.mock_primary = self.mock_members[0]
    else:
        self.mock_primary = None
    if (ismaster_hosts is not None):
        self.mock_ismaster_hosts = ismaster_hosts
    else:
        self.mock_ismaster_hosts = members[:]
    self.mock_mongoses = mongoses[:]
    self.mock_down_hosts = []
    self.mock_wire_versions = {}
    self.mock_max_write_batch_sizes = {}
    self.mock_rtts = {}
    kwargs['_pool_class'] = partial(MockPool, self)
    kwargs['_monitor_class'] = partial(MockMonitor, self)
    client_options = client_context.ssl_client_options.copy()
    client_options.update(kwargs)
    super(MockClient, self).__init__(*args, **client_options)
