Files
ems/backend/tests/test_planning_economics_columns.py
Dusan Vojacek 8bef1c6da6
Some checks failed
CI and deploy / migration-check (push) Failing after 13s
CI and deploy / deploy (push) Has been skipped
prepsani s opusem dle planu
2026-05-24 22:44:21 +02:00

28 lines
852 B
Python

"""DispatchResult: nove ekonomicke sloupce (cashflow/arbitraz/penalty/bonus)."""
from __future__ import annotations
import unittest
from dataclasses import fields
from services.planning_engine import DispatchResult
class DispatchResultEconomicsFieldsTests(unittest.TestCase):
def test_has_new_economics_fields(self) -> None:
names = {f.name for f in fields(DispatchResult)}
for required in (
"cashflow_czk",
"battery_arbitrage_czk",
"penalty_czk",
"green_bonus_czk",
):
self.assertIn(required, names, f"DispatchResult missing field {required}")
def test_legacy_expected_cost_czk_kept(self) -> None:
names = {f.name for f in fields(DispatchResult)}
self.assertIn("expected_cost_czk", names)
if __name__ == "__main__":
unittest.main()