add return_value

This commit is contained in:
def 2022-08-27 18:05:19 +02:00
parent 8821ec834b
commit 9ea6867edb

View file

@ -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