-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[QI2-1081] Implemented job result fetching (#12)
- Loading branch information
1 parent
bbc1411
commit 762b48d
Showing
6 changed files
with
307 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,10 @@ | ||
{ | ||
"python.analysis.extraPaths": [ | ||
"qiskit_quantuminspire" | ||
] | ||
} | ||
], | ||
"python.testing.unittestEnabled": false, | ||
"python.testing.pytestEnabled": true, | ||
"python.testing.pytestPath": "${command:python.interpreterPath}", | ||
"python.testing.autoTestDiscoverOnSaveEnabled": true, | ||
"python.testing.cwd": "${workspaceFolder}", | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from unittest.mock import AsyncMock | ||
|
||
import pytest | ||
from pytest_mock import MockFixture | ||
|
||
from qiskit_quantuminspire.api.pagination import PageReader | ||
|
||
|
||
@pytest.fixture | ||
def page_reader_mock(mocker: MockFixture) -> AsyncMock: | ||
# Simply calling mocker.patch() doesn't work because PageReader is a generic class | ||
page_reader_mock = AsyncMock() | ||
page_reader_mock.get_all = AsyncMock() | ||
mocker.patch.object(PageReader, "get_all", page_reader_mock.get_all) | ||
return page_reader_mock |
Oops, something went wrong.