@@ -151,7 +151,7 @@ async def setup_all_batteries(mocker: MockerFixture) -> AsyncIterator[SetupArgs]
151151 # the scope of this tests. This tests should cover BatteryPool only.
152152 # We use our own battery status channel, where we easily control set of working
153153 # batteries.
154- battery_pool = microgrid .battery_pool (priority = 5 )
154+ battery_pool = microgrid .new_battery_pool (priority = 5 )
155155
156156 dp = microgrid ._data_pipeline ._DATA_PIPELINE
157157 assert dp is not None
@@ -205,7 +205,7 @@ async def setup_batteries_pool(mocker: MockerFixture) -> AsyncIterator[SetupArgs
205205 # batteries.
206206 all_batteries = list (get_components (mock_microgrid , ComponentCategory .BATTERY ))
207207
208- battery_pool = microgrid .battery_pool (
208+ battery_pool = microgrid .new_battery_pool (
209209 priority = 5 , component_ids = set (all_batteries [:2 ])
210210 )
211211
@@ -543,7 +543,7 @@ async def test_batter_pool_power_no_batteries(mocker: MockerFixture) -> None:
543543 )
544544 )
545545 await mockgrid .start (mocker )
546- battery_pool = microgrid .battery_pool (priority = 5 )
546+ battery_pool = microgrid .new_battery_pool (priority = 5 )
547547 power_receiver = battery_pool .power .new_receiver ()
548548
549549 await mockgrid .mock_resampler .send_non_existing_component_value ()
@@ -560,7 +560,7 @@ async def test_battery_pool_power_with_no_inverters(mocker: MockerFixture) -> No
560560 await mockgrid .start (mocker )
561561
562562 with pytest .raises (RuntimeError ):
563- microgrid .battery_pool (priority = 5 )
563+ microgrid .new_battery_pool (priority = 5 )
564564
565565
566566async def test_battery_pool_power_incomplete_bat_request (mocker : MockerFixture ) -> None :
@@ -582,7 +582,7 @@ async def test_battery_pool_power_incomplete_bat_request(mocker: MockerFixture)
582582
583583 with pytest .raises (FormulaGenerationError ):
584584 # Request only two of the three batteries behind the inverters
585- battery_pool = microgrid .battery_pool (
585+ battery_pool = microgrid .new_battery_pool (
586586 priority = 5 , component_ids = set ([bats [1 ].component_id , bats [0 ].component_id ])
587587 )
588588 power_receiver = battery_pool .power .new_receiver ()
@@ -592,7 +592,7 @@ async def test_battery_pool_power_incomplete_bat_request(mocker: MockerFixture)
592592
593593async def _test_battery_pool_power (mockgrid : MockMicrogrid ) -> None :
594594 async with mockgrid :
595- battery_pool = microgrid .battery_pool (priority = 5 )
595+ battery_pool = microgrid .new_battery_pool (priority = 5 )
596596 power_receiver = battery_pool .power .new_receiver ()
597597
598598 await mockgrid .mock_resampler .send_bat_inverter_power ([2.0 , 3.0 ])
0 commit comments