from services.outfit_tags import enrich_outfit_tag, normalize_outfit_list, parse_and_normalize_outfit_json


def test_enrich_shorts_and_tank():
    out = normalize_outfit_list(["sports_shorts", "torn_tank_top", "championship_belt_collar"])
    assert out == ["black_sports_shorts", "white_torn_tank_top", "gold_championship_belt_collar"]


def test_keeps_existing_color():
    assert enrich_outfit_tag("red_dress") == "red_dress"
    assert "red" in normalize_outfit_list(["red_dress"])[0]


def test_parse_json_string():
    raw = '["sports_shorts", "torn_tank_top"]'
    parsed = parse_and_normalize_outfit_json(raw)
    assert "black_sports_shorts" in parsed
    assert "white_torn_tank_top" in parsed
