Skip to content

Commit 695bb91

Browse files
committed
Improve speed of battery pool control tests
This is done by patching the wait time for component data in the battery pool to a lower value. Signed-off-by: Sahas Subramanian <[email protected]>
1 parent 88bd28e commit 695bb91

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/timeseries/_battery_pool/test_battery_pool_control_methods.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,11 @@ async def _patch_battery_pool_status(
8989
If `battery_ids` is not None, the mock will always return `battery_ids`.
9090
Otherwise, it will return the requested batteries.
9191
"""
92+
mocker.patch.object(
93+
timeseries.battery_pool._methods, # pylint: disable=protected-access
94+
"WAIT_FOR_COMPONENT_DATA_SEC",
95+
0.1,
96+
)
9297
if battery_ids:
9398
mock = MagicMock(spec=ComponentPoolStatusTracker)
9499
mock.get_working_components.return_value = battery_ids

0 commit comments

Comments
 (0)