Skip to content

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

530 B
Raw Blame
"""The shared API envelope must preserve explicit data values."""

import json

import pytest

from app.utils import utils


@pytest.mark.parametrize("data", [False, 0, "", [], {}])
def test_response_preserves_explicit_falsy_payloads(data):
    response = utils.get_response(200, data=data)
    serialized = json.loads(json.dumps(response))
    assert "data" in serialized
    assert serialized["data"] == data


def test_response_without_data_retains_status_only_contract():
    assert utils.get_response(200) == {"status": 200}