17 lines
540 B
Python
17 lines
540 B
Python
from energiamesh.adapters.der_controller import DERControllerAdapter
|
|
from energiamesh.adapters.weather_station import WeatherStationAdapter
|
|
|
|
|
|
def test_der_controller_adapter_basic():
|
|
der = DERControllerAdapter(site_id="DER-01")
|
|
assert der.connect() is True
|
|
out = der.dispatch("set_point", {"p": 100})
|
|
assert out["status"] == "ok"
|
|
|
|
|
|
def test_weather_station_adapter_basic():
|
|
ws = WeatherStationAdapter(station_id="WS-01")
|
|
assert ws.connect() is True
|
|
f = ws.forecast()
|
|
assert "temp_c" in f and "wind_mps" in f
|