24 lines
904 B
Python
24 lines
904 B
Python
"""Verifica che _deps esponga front_camera() e tab_right_arm_cfg()."""
|
|
from __future__ import annotations
|
|
|
|
from presa_mano.api import _deps
|
|
from presa_mano.clients import NuwaClient
|
|
|
|
|
|
def test_front_camera_returns_nuwa_client_with_config_base_url():
|
|
cam = _deps.front_camera()
|
|
assert isinstance(cam, NuwaClient)
|
|
# base_url da config.yaml (stripped della trailing slash dal client)
|
|
assert cam.base_url.startswith("http")
|
|
# Deve essere DIVERSO dall'URL della nuwa principale
|
|
assert cam.base_url != _deps.nuwa().base_url
|
|
|
|
|
|
def test_tab_right_arm_cfg_returns_dict_with_required_keys():
|
|
cfg = _deps.tab_right_arm_cfg()
|
|
assert cfg["yolo_class"] == "pestello"
|
|
for key in ("yolo_conf_front", "yolo_conf_wrist", "move_offset_camera_mm",
|
|
"axis_sign_cam_to_wrist", "max_step_m", "z_floor_m",
|
|
"home_pose", "custom_pose"):
|
|
assert key in cfg
|