energiamesh-federated-contr.../tests/test_adapters.py

11 lines
389 B
Python

from energiamesh.adapters.der_controller import DERControllerAdapter
from energiamesh.adapters.weather_station import WeatherStationAdapter
def test_adapters_basic():
der = DERControllerAdapter("site-1")
wst = WeatherStationAdapter("ws-1")
assert der.build_initial_state()["site_id"] == "site-1"
forecast = wst.read_forecast()
assert forecast["station_id"] == "ws-1"