"""测试配置模块"""
import pytest
from src.config import Config

def test_config_load():
    """测试配置加载"""
    config = Config()
    assert config is not None

def test_get_scenarios():
    """测试获取场景列表"""
    config = Config()
    scenarios = config.get_scenarios()
    assert isinstance(scenarios, list)
    assert len(scenarios) > 0

def test_get_scenario_by_id():
    """测试根据ID获取场景"""
    config = Config()
    scenario = config.get_scenario("birthday_mom_practical")
    assert scenario is not None
    assert scenario["relation"] == "妈妈"

def test_get_gifts_by_scenario():
    """测试获取场景对应的礼物"""
    config = Config()
    gifts = config.get_gifts("birthday_mom_practical")
    assert isinstance(gifts, list)
    assert len(gifts) > 0
