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

Method _validate_jar

tests/mock_server.py:163–173  ·  view source on GitHub ↗
(self, jar_path, url)

Source from the content-addressed store, hash-verified

161 return MockServerType.Legacy
162
163 def _validate_jar(self, jar_path, url):
164 if not os.path.exists(jar_path):
165 if not url:
166 raise MockServerException(
167 f"{jar_path} does not exist and no URL specified.")
168 # fp = open(runpath, "wb")
169 # ulp = urlopen(url)
170 # jarblob = ulp.read()
171 # fp.write(jarblob)
172 # fp.close()
173 urlretrieve(url, jar_path)
174
175 def _setup_listener(self):
176 sock = socket.socket()

Callers 1

__init__Method · 0.95

Calls 2

MockServerExceptionClass · 0.85
existsMethod · 0.45

Tested by

no test coverage detected