Branch 4: BA81 GEN cutoff audit + exekuce při sell<0
This commit is contained in:
@@ -11,6 +11,7 @@ from services.control.exporter_monolith import (
|
||||
_deye_reg178_verify_with_double_read,
|
||||
_deye_tou_params,
|
||||
_deye_tou_power_verify_match,
|
||||
deye_mi_export_cutoff_want_enabled,
|
||||
deye_reg_triggers_self_sustain_after_verify_exhaust,
|
||||
get_deye_mode,
|
||||
)
|
||||
@@ -114,6 +115,36 @@ class DeyeTouParamsTests(unittest.TestCase):
|
||||
)
|
||||
self.assertEqual(get_deye_mode(sp), "PASSIVE")
|
||||
|
||||
def test_mi_export_cutoff_on_export_ban_without_plan_flag(self) -> None:
|
||||
self.assertTrue(
|
||||
deye_mi_export_cutoff_want_enabled(
|
||||
gen_microinverter_cutoff_enabled=True,
|
||||
deye_gen_cutoff_enabled=False,
|
||||
export_ban=True,
|
||||
deye_mode="PASSIVE",
|
||||
)
|
||||
)
|
||||
|
||||
def test_mi_export_cutoff_off_when_sell_mode(self) -> None:
|
||||
self.assertFalse(
|
||||
deye_mi_export_cutoff_want_enabled(
|
||||
gen_microinverter_cutoff_enabled=True,
|
||||
deye_gen_cutoff_enabled=True,
|
||||
export_ban=True,
|
||||
deye_mode="SELL",
|
||||
)
|
||||
)
|
||||
|
||||
def test_mi_export_cutoff_off_without_feature_flag(self) -> None:
|
||||
self.assertFalse(
|
||||
deye_mi_export_cutoff_want_enabled(
|
||||
gen_microinverter_cutoff_enabled=False,
|
||||
deye_gen_cutoff_enabled=True,
|
||||
export_ban=True,
|
||||
deye_mode="PASSIVE",
|
||||
)
|
||||
)
|
||||
|
||||
def test_build_setpoints_uses_explicit_export_limit(self) -> None:
|
||||
mode = OperatingModeInfo(
|
||||
mode_code="AUTO",
|
||||
|
||||
Reference in New Issue
Block a user