MCPcopy Create free account
hub / github.com/apache/cassandra-python-driver / __init__

Method __init__

tests/unit/test_control_connection.py:35–47  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

33class MockMetadata(object):
34
35 def __init__(self):
36 self.hosts = {
37 DefaultEndPoint("192.168.1.0"): Host(DefaultEndPoint("192.168.1.0"), SimpleConvictionPolicy),
38 DefaultEndPoint("192.168.1.1"): Host(DefaultEndPoint("192.168.1.1"), SimpleConvictionPolicy),
39 DefaultEndPoint("192.168.1.2"): Host(DefaultEndPoint("192.168.1.2"), SimpleConvictionPolicy)
40 }
41 for host in self.hosts.values():
42 host.set_up()
43 host.release_version = "3.11"
44
45 self.cluster_name = None
46 self.partitioner = None
47 self.token_map = {}
48
49 def get_host(self, endpoint_or_address, port=None):
50 if not isinstance(endpoint_or_address, EndPoint):

Callers

nothing calls this directly

Calls 4

DefaultEndPointClass · 0.90
HostClass · 0.90
set_upMethod · 0.80
valuesMethod · 0.45

Tested by

no test coverage detected