Skip to content

Commit

Permalink
Update invalid token test (#1367)
Browse files Browse the repository at this point in the history
  • Loading branch information
kt474 authored Feb 1, 2024
1 parent 481725b commit 5bc3b42
Showing 1 changed file with 2 additions and 1 deletion.
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

0 comments on commit 5bc3b42

Please sign in to comment.