19 lines
604 B
Python
19 lines
604 B
Python
import sys
|
|
import os
|
|
|
|
# Ensure package source is importable during tests
|
|
SRC_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "src"))
|
|
if SRC_DIR not in sys.path:
|
|
sys.path.insert(0, SRC_DIR)
|
|
|
|
from pulsemesh_open_telemetry_visualization_a.adapters.der_health import collect_telemetry as der_collect
|
|
from pulsemesh_open_telemetry_visualization_a.adapters.hvac_telemetry import collect_telemetry as hvac_collect
|
|
|
|
|
|
def test_adapters_return_telemetry_sample():
|
|
ds = der_collect()
|
|
assert ds.metric == "der.health"
|
|
|
|
hs = hvac_collect()
|
|
assert hs.metric == "hvac.energy_kW"
|