Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update invalid token test #1367

Merged
merged 1 commit into from
Feb 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion test/integration/test_auth_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import re

from qiskit_ibm_runtime.api.exceptions import RequestsApiError
from qiskit_ibm_runtime.exceptions import IBMNotAuthorizedError
from qiskit_ibm_runtime.api.client_parameters import ClientParameters
from qiskit_ibm_runtime.api.clients import AuthClient
from ..ibm_test_case import IBMTestCase
Expand All @@ -41,7 +42,7 @@ def test_url_404(self, dependencies: IntegrationTestDependencies) -> None:
def test_invalid_token(self, dependencies: IntegrationTestDependencies) -> None:
"""Test login using invalid token."""
qe_token = "INVALID_TOKEN"
with self.assertRaises(RequestsApiError):
with self.assertRaises(IBMNotAuthorizedError):
_ = self._init_auth_client(qe_token, dependencies.url)

@integration_test_setup(supported_channel=["ibm_quantum"], init_service=False)
Expand Down
Loading