"""The data_source seam selects the warehouse SSOT provider."""
from __future__ import annotations

from fxhnt.cli import _data_provider
from fxhnt.config import Settings


def test_data_provider_warehouse_returns_warehouse_provider(tmp_path) -> None:
    from fxhnt.adapters.warehouse.price_provider import WarehousePriceProvider
    s = Settings(warehouse_path=str(tmp_path / "wh.duckdb"))
    provider = _data_provider("warehouse", s)
    assert isinstance(provider, WarehousePriceProvider)
    assert provider.name == "warehouse"
