From ac73e6b91db0d300dcd77beb1852f7f72c3eda03 Mon Sep 17 00:00:00 2001 From: Jace Browning Date: Sun, 24 Nov 2024 00:33:17 -0500 Subject: [PATCH] Fix more tests --- app/tests/test_views_examples.py | 6 +++--- app/tests/test_views_templates.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/tests/test_views_examples.py b/app/tests/test_views_examples.py index bc3acfc7..953c81af 100644 --- a/app/tests/test_views_examples.py +++ b/app/tests/test_views_examples.py @@ -21,15 +21,15 @@ def it_can_enable_automatic_refresh(expect, client, monkeypatch): def describe_animated(): @pytest.mark.slow - def it_forces_gif(expect, client): + def it_forces_webp(expect, client): request, response = client.get("/examples/animated", timeout=15) expect(response.status) == 200 - expect(response.text.count("gif")) > 100 + expect(response.text.count("webp")) > 100 expect(response.text).excludes("setInterval") def describe_static(): @pytest.mark.slow - def it_forces_jpg(expect, client): + def it_forces_png(expect, client): request, response = client.get("/examples/static", timeout=15) expect(response.status) == 200 expect(response.text.count("png")) > 100 diff --git a/app/tests/test_views_templates.py b/app/tests/test_views_templates.py index 1eb917a3..535ce82e 100644 --- a/app/tests/test_views_templates.py +++ b/app/tests/test_views_templates.py @@ -41,12 +41,12 @@ def it_includes_metadata(expect, client, slash): "_self": "http://localhost:5000/templates/iw", } - def it_defaults_to_gif_example_when_available(expect, client): + def it_defaults_to_webp_example_when_available(expect, client): request, response = client.get("/templates/bongo") expect(response.status) == 200 expect(response.json["example"]["url"]) == ( "http://localhost:5000/images/bongo/" - "Any_sound_when_you're_trying_to_sleep/Max_volume_alarm_when_you_have_to_wake_up.gif" + "Any_sound_when_you're_trying_to_sleep/Max_volume_alarm_when_you_have_to_wake_up.webp" ) def it_returns_404_when_missing(expect, client):