Skip to content

利用 AI 大模型和自动化工作流,根据主题或关键词一键生成高清短视频。Generate HD short videos from a topic or keyword with an automated AI workflow.

496 B
Raw Blame
import json

import pytest

from app.utils.utils import load_locales


@pytest.mark.parametrize("encoding", ["utf-8", "utf-8-sig"])
def test_locale_loading_accepts_utf8_with_or_without_bom(tmp_path, encoding):
    content = {"label": "Français", "embedded": "keep\ufeffinside"}
    (tmp_path / "fr.json").write_text(json.dumps(content, ensure_ascii=False), encoding=encoding)
    try:
        assert load_locales(str(tmp_path)) == {"fr": content}
    finally:
        load_locales.cache_clear()