Skip to content

Commit d6f843a

Browse files
committed
Fix mock return value
The `set_power()` method is from the microgrid client, not the protobuf stub, so it should really return `None` instead of `Empty`. Signed-off-by: Leandro Lucarella <[email protected]>
1 parent 5a52504 commit d6f843a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

tests/utils/mock_microgrid_client.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
Location,
1919
MeterData,
2020
)
21-
from google.protobuf.empty_pb2 import Empty # pylint: disable=no-name-in-module
2221
from pytest_mock import MockerFixture
2322

2423
from frequenz.sdk._internal._constants import RECEIVER_MAX_SIZE
@@ -282,7 +281,7 @@ def _create_mock_api(
282281
)
283282

284283
# Can be override in the future
285-
api.set_power = AsyncMock(return_value=Empty)
284+
api.set_power = AsyncMock(return_value=None)
286285
return api
287286

288287
def _get_battery_receiver(

0 commit comments

Comments
 (0)