-
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.
- Loading branch information
1 parent
2dd409b
commit 101c501
Showing
4 changed files
with
20 additions
and
13 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
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 |
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 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