Skip to content

Commit 61b4947

Browse files
test(ohme): use charger_control_active in the #5443 dispatch-sensor tests
The tests main added in #5443 read OhmeAPI.control_active, which this branch renamed to charger_control_active when control moved into the shared CarChargerControl mixin. Only the attribute name changes; the assertions are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent ace254e commit 61b4947

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎apps/predbat/tests/test_ohme.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2739,7 +2739,7 @@ def _test_ohme_run_iog_dispatch_sensor_followed(my_predbat=None):
27392739
api.ohme_control = True
27402740
api.args["octopus_intelligent_slot"] = [OCTOPUS_DISPATCH_ENTITY]
27412741
_ohme_run_poll(api, first=True)
2742-
assert api.control_active is False, "Expected Predbat-led control ignored on Intelligent with the completed dispatches from Octopus"
2742+
assert api.charger_control_active is False, "Expected Predbat-led control ignored on Intelligent with the completed dispatches from Octopus"
27432743

27442744
print("PASS: the Octopus dispatch sensor coming and going was followed")
27452745
return 0
@@ -2773,7 +2773,7 @@ def start(control=False):
27732773
api = start(control=True)
27742774
_ohme_set_tariff(api, "E-1R-COSY-22-12-08-A")
27752775
_ohme_run_poll(api, seconds=120)
2776-
assert api.control_active is True and api.slot_mode is None, f"Expected Predbat-led control with no slot wiring, got {api.control_active} {api.slot_mode}"
2776+
assert api.charger_control_active is True and api.slot_mode is None, f"Expected Predbat-led control with no slot wiring, got {api.charger_control_active} {api.slot_mode}"
27772777
for arg in ("octopus_intelligent_slot", "octopus_intelligent_planned_slot", "octopus_ready_time", "octopus_charge_limit"):
27782778
assert api.args[arg] == [], f"Expected {arg} cleared for Predbat-led control, got {api.args[arg]}"
27792779

@@ -2820,7 +2820,7 @@ def start_two_cars(control=False):
28202820
api = start_two_cars(control=True)
28212821
_ohme_set_tariff(api, "E-1R-COSY-22-12-08-A")
28222822
_ohme_run_poll(api, seconds=120)
2823-
assert api.control_active is True and api.slot_mode is None, f"Expected Predbat-led control with no slot wiring, got {api.control_active} {api.slot_mode}"
2823+
assert api.charger_control_active is True and api.slot_mode is None, f"Expected Predbat-led control with no slot wiring, got {api.charger_control_active} {api.slot_mode}"
28242824
for arg in ("octopus_intelligent_slot", "octopus_intelligent_planned_slot", "octopus_ready_time", "octopus_charge_limit"):
28252825
assert api.args[arg] == [], f"Expected {arg} cleared for Predbat-led control with two cars wired, got {api.args[arg]}"
28262826

0 commit comments

Comments
 (0)