mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-12-01 19:06:45 +00:00
add return_value
This commit is contained in:
parent
8821ec834b
commit
9ea6867edb
|
@ -60,7 +60,7 @@ class BlockDevicesMockReturnFalse:
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def mock_block_device_return_none(mocker):
|
def mock_block_device_return_none(mocker):
|
||||||
mock = mocker.patch(
|
mock = mocker.patch(
|
||||||
"selfprivacy_api.graphql.mutations.storage_mutation.BlockDevices", autospec=True
|
"selfprivacy_api.graphql.mutations.storage_mutation.BlockDevices", autospec=True, return_value=BlockDevicesMockReturnNone
|
||||||
)
|
)
|
||||||
return mock
|
return mock
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ def mock_block_device_return_none(mocker):
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def mock_block_device_return_true(mocker):
|
def mock_block_device_return_true(mocker):
|
||||||
mock = mocker.patch(
|
mock = mocker.patch(
|
||||||
"selfprivacy_api.graphql.mutations.storage_mutation.BlockDevices", autospec=True
|
"selfprivacy_api.graphql.mutations.storage_mutation.BlockDevices", autospec=True, return_value=BlockDevicesMockReturnTrue
|
||||||
)
|
)
|
||||||
return mock
|
return mock
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ def mock_block_device_return_true(mocker):
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def mock_block_device_return_false(mocker):
|
def mock_block_device_return_false(mocker):
|
||||||
mock = mocker.patch(
|
mock = mocker.patch(
|
||||||
"selfprivacy_api.graphql.mutations.storage_mutation.BlockDevices", autospec=True
|
"selfprivacy_api.graphql.mutations.storage_mutation.BlockDevices", autospec=True, return_value=BlockDevicesMockReturnFalse
|
||||||
)
|
)
|
||||||
return mock
|
return mock
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue