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

Method _build_caves_url

tests/mock_server.py:287–302  ·  view source on GitHub ↗
(self, url)

Source from the content-addressed store, hash-verified

285 return MockServerType.GoCAVES
286
287 def _build_caves_url(self, url):
288
289 if sys.platform.startswith('linux'):
290 if platform.machine() == 'aarch64':
291 self._caves_url = f"{url}/{self._caves_version}/gocaves-linux-arm64"
292 else:
293 self._caves_url = f"{url}/{self._caves_version}/gocaves-linux-amd64"
294 elif sys.platform.startswith('darwin'):
295 if platform.machine() == 'arm64':
296 self._caves_url = f"{url}/{self._caves_version}/gocaves-macos-arm64"
297 else:
298 self._caves_url = f"{url}/{self._caves_version}/gocaves-macos"
299 elif sys.platform.startswith('win32'):
300 self._caves_url = f"{url}/{self._caves_version}/gocaves-windows.exe"
301 else:
302 raise MockServerException("Unrecognized platform for running GoCAVES mock server.")
303
304 def _validate_caves_path(self, caves_path=None):
305 if not (caves_path and not caves_path.isspace()):

Callers 1

__init__Method · 0.95

Calls 1

MockServerExceptionClass · 0.85

Tested by

no test coverage detected