X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/acc7d4a40ae78e866c983624ec36b7bae3b918a9..3104ab72159ede44043fcd71dc0094c97f9c4251:/sdk/python/tests/arvados_testutil.py diff --git a/sdk/python/tests/arvados_testutil.py b/sdk/python/tests/arvados_testutil.py index b4e97f6e5a..6e2a078886 100644 --- a/sdk/python/tests/arvados_testutil.py +++ b/sdk/python/tests/arvados_testutil.py @@ -63,7 +63,7 @@ class FakeCurl: def setopt(self, opt, val): self._opt[str(opt)] = val - if opt == pycurl.WRITEDATA: + if opt == pycurl.WRITEFUNCTION: self._writer = val elif opt == pycurl.HEADERFUNCTION: self._headerfunction = val @@ -79,7 +79,7 @@ class FakeCurl: self._headerfunction("HTTP/1.1 {} Status".format(self._resp_code)) for k, v in self._resp_headers.iteritems(): self._headerfunction(k + ': ' + str(v)) - self._writer.write(self._resp_body) + self._writer(self._resp_body) def close(self): pass @@ -141,7 +141,8 @@ class ApiClientMock(object): service_host=None, service_port=None, service_ssl_flag=False, - additional_services=[]): + additional_services=[], + read_only=False): if api_mock is None: api_mock = self.api_client_mock() body = { @@ -153,6 +154,7 @@ class ApiClientMock(object): 'service_port': service_port or 65535-i, 'service_ssl_flag': service_ssl_flag, 'service_type': service_type, + 'read_only': read_only, } for i in range(0, count)] + additional_services } self._mock_api_call(api_mock.keep_services().accessible, status, body)