test: verify account persistence and all template profiles

This commit is contained in:
Pigway
2026-10-02 08:47:33 +08:00
parent 141849d682
commit f7c890c551
2 changed files with 17 additions and 1 deletions
+15
View File
@@ -68,3 +68,18 @@ def test_url_default_disabled(service):
def test_url_ssrf(service, url):
with pytest.raises(FlowError):
service.assets.fetch_url(url)
@pytest.mark.parametrize(
"template",
["daily-dashboard", "weather", "calendar", "quote", "photo-text", "system-alert"],
)
def test_template_grayscale(service, template):
img = Image.open(BytesIO(service.renderer.render(template, {}, "grayscale")))
assert img.size == (1200, 1600)
assert len(set(img.getpixel((600, 800)))) == 1
def test_calendar_rejects_invalid_date(service):
with pytest.raises(FlowError):
service.renderer.render("calendar", {"date": "not-a-date"})