'Returns the wire version for mongo. Only used to unit tests which instrument the connection.'

def mongo_wire_version(self):

    self.database.connection._ensure_connected()
    return self.database.connection.max_wire_version
