test: verify account persistence and all template profiles
This commit is contained in:
@@ -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"})
|
||||
|
||||
Reference in New Issue
Block a user