Skip to content

Commit 04f5d11

Browse files
committed
fix: connection string api key tests
1 parent a444eae commit 04f5d11

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

azure-quantum/tests/unit/test_authentication.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,7 @@ def test_workspace_auth_connection_string_api_key(self):
341341
token = self._get_rp_credential()
342342
workspace = self._get_workspace(token)
343343
self._enable_workspace_api_keys(token, workspace, True)
344+
time.sleep(10)
344345
connection_string = self._get_current_primary_connection_string(token)
345346
self.resume_recording()
346347
# Sleep 1 min for cache to be cleared
@@ -351,8 +352,8 @@ def test_workspace_auth_connection_string_api_key(self):
351352
workspace = Workspace.from_connection_string(
352353
connection_string=connection_string,
353354
)
354-
jobs = workspace.list_jobs()
355-
assert len(jobs) >= 0
355+
targets = workspace.get_targets()
356+
assert len(targets) >= 0
356357

357358
if not self.is_playback:
358359
self.pause_recording()
@@ -369,6 +370,6 @@ def test_workspace_auth_connection_string_api_key(self):
369370
connection_string=connection_string,
370371
)
371372
with self.assertRaises(Exception) as context:
372-
workspace.list_jobs()
373+
workspace.get_targets()
373374

374375
self.assertIn("Unauthorized", context.exception.message)

0 commit comments

Comments
 (0)