MCPcopy Create free account
hub / github.com/couchbase/couchbase-python-client / __init__

Method __init__

tests/mock_server.py:125–154  ·  view source on GitHub ↗

Creates a new instance of the mock server. You must actually call 'start()' for it to be invoked. :param list buckets: A list of BucketSpec items :param string runpath: a string pointing to the location of the mock :param string url: The URL to use to downloa

(self,
                 buckets,  # type: List[LegacyMockBucketSpec]
                 jar_path,  # type: str
                 url=None,  # type: str
                 replicas=None,  # type: int
                 vbuckets=None,  # type: int
                 nodes=4  # type: int
                 )

Source from the content-addressed store, hash-verified

123class LegacyMockServer(MockServer):
124
125 def __init__(self,
126 buckets, # type: List[LegacyMockBucketSpec]
127 jar_path, # type: str
128 url=None, # type: str
129 replicas=None, # type: int
130 vbuckets=None, # type: int
131 nodes=4 # type: int
132 ):
133 """
134 Creates a new instance of the mock server. You must actually call
135 'start()' for it to be invoked.
136 :param list buckets: A list of BucketSpec items
137 :param string runpath: a string pointing to the location of the mock
138 :param string url: The URL to use to download the mock. This is only
139 used if runpath does not exist
140 :param int replicas: How many replicas should each bucket have
141 :param int vbuckets: How many vbuckets should each bucket have
142 :param int nodes: How many total nodes in the cluster
143
144 Note that you must have ``java`` in your `PATH`
145 """
146
147 super().__init__()
148 self._validate_jar(jar_path, url)
149 self._jar_path = jar_path
150 self._url = url
151 self._buckets = buckets
152 self._nodes = nodes
153 self._vbuckets = vbuckets
154 self._replicas = replicas
155
156 # @property
157 # def rest_port(self):

Callers

nothing calls this directly

Calls 2

_validate_jarMethod · 0.95
__init__Method · 0.45

Tested by

no test coverage detected