feat(insta-lab): card_renderer theme 폴백 가드 (HTML 없으면 default)
This commit is contained in:
@@ -46,3 +46,14 @@ async def test_render_slate_produces_ten_pngs(tmp_db_and_dirs):
|
||||
db_module.update_slate_status(sid, "rendered")
|
||||
assets = db_module.list_card_assets(sid)
|
||||
assert {a["page_index"] for a in assets} == set(range(1, 11))
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_render_falls_back_to_default_when_theme_html_missing(tmp_db_and_dirs):
|
||||
"""존재하지 않는 theme HTML 지정 시 default/card.html.j2로 폴백, 정상 PNG 생성."""
|
||||
sid = _seed_slate()
|
||||
paths = await card_renderer.render_slate(sid, template="ghost_theme/card.html.j2")
|
||||
assert len(paths) == 10
|
||||
for p in paths:
|
||||
assert os.path.exists(p)
|
||||
assert os.path.getsize(p) > 1000
|
||||
|
||||
Reference in New Issue
Block a user