"""The catalog formatter renders the SSOT inventory as a readable table."""
from __future__ import annotations

from fxhnt.application.warehouse_catalog import format_catalog


def test_format_catalog_renders_symbols_and_dates() -> None:
    out = format_catalog([("ES", 2, 0, 86_400), ("NQ", 1, 86_400, 86_400)])
    assert "ES" in out and "NQ" in out
    assert "1970-01-01" in out and "1970-01-02" in out   # ts 0 and 86400 as ISO days
    assert "2" in out                                     # ES bar count


def test_format_catalog_empty() -> None:
    assert "empty" in format_catalog([]).lower()
