Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ class ServerlessClient(BaseClient): # pylint: disable=too-many-public-methods
def __init__( # pylint: disable=too-many-positional-arguments
self,
host: Optional[str] = None,
version: Optional[str] = None,
token: Optional[str] = None,
instance: Optional[str] = None,
channel: Optional[str] = None,
Expand All @@ -117,7 +116,6 @@ def __init__( # pylint: disable=too-many-positional-arguments

Args:
host: host of gateway. If None, it uses the ENV_GATEWAY_PROVIDER_HOST env var
version: version of gateway
token: authorization token
instance: IBM Cloud CRN
channel: identifies the method to use to authenticate the user
Expand All @@ -127,7 +125,7 @@ def __init__( # pylint: disable=too-many-positional-arguments
raise QiskitServerlessException("Please provide `host` of gateway.")
host = host.rstrip("/")

version = version or os.environ.get(ENV_GATEWAY_PROVIDER_VERSION)
version = os.environ.get(ENV_GATEWAY_PROVIDER_VERSION)
if version is None:
version = GATEWAY_PROVIDER_VERSION_DEFAULT

Expand Down
8 changes: 4 additions & 4 deletions client/tests/core/test_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def test_update_sub_status(self, job_env_variables):
@patch("requests.get", Mock(return_value=ResponseMock()))
def test_filtered_logs(self):
"""Tests job filtered log."""
client = ServerlessClient(host="host", token="token", instance="instance", version="version")
client = ServerlessClient(host="host", token="token", instance="instance")
client.logs = MagicMock(
return_value="This is the line 1\nThis is the second line\nOK. This is the last line.\n", # pylint: disable=line-too-long
)
Expand All @@ -142,7 +142,7 @@ def test_filtered_logs(self):
@patch("requests.get", Mock(return_value=ResponseMock()))
def test_error_message(self):
"""Tests job filtered log."""
client = ServerlessClient(host="host", token="token", instance="instance", version="version")
client = ServerlessClient(host="host", token="token", instance="instance")
client.status = MagicMock(
return_value="ERROR",
)
Expand All @@ -167,7 +167,7 @@ def test_error_message(self):
)
def test_runtime_sessions(self):
"""Tests runtime session id retrieval for serverless job."""
client = ServerlessClient(host="host", token="token", instance="instance", version="v1")
client = ServerlessClient(host="host", token="token", instance="instance")

job_id = "8317718f-5c0d-4fb6-9947-72e480b8a348"
runtime_sessions = client.runtime_sessions(job_id)
Expand All @@ -182,7 +182,7 @@ def test_runtime_sessions(self):
)
def test_runtime_jobs(self):
"""Tests runtime job id retrieval for serverless job."""
client = ServerlessClient(host="host", token="token", instance="instance", version="v1")
client = ServerlessClient(host="host", token="token", instance="instance")

job_id = "8317718f-5c0d-4fb6-9947-72e480b8a348"
runtime_jobs = client.runtime_jobs(job_id)
Expand Down
1 change: 0 additions & 1 deletion client/tests/core/test_serverless_client_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ def mock_client():
token="test-token",
instance="test-instance",
channel="ibm_quantum_platform",
version="v1",
)
return client

Expand Down
1 change: 0 additions & 1 deletion client/tests/core/test_serverless_client_jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ def mock_client():
host="https://test-host.com",
token="test-token",
instance="test-instance",
version="v1",
)
return client

Expand Down