From c110318608e403d6a76392706f1ffd7bc5a444d9 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Sat, 16 Jul 2022 15:50:01 +0100 Subject: [PATCH] Test all pages have templates --- website/common/tests.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/website/common/tests.py b/website/common/tests.py index 89c325f..08aa449 100644 --- a/website/common/tests.py +++ b/website/common/tests.py @@ -1,3 +1,4 @@ +from django.template.loader import get_template from django.test import SimpleTestCase from wagtail.rich_text import features as richtext_feature_registry @@ -24,6 +25,10 @@ class BasePageTestCase(SimpleTestCase): f"{page_model} does not inherit from {BasePage}.", ) + def test_pages_have_template(self) -> None: + for page in get_page_models(): + get_template(page.template) + class YouTubeLiteEmbedFinderTestCase(SimpleTestCase): def test_finds_video_id(self) -> None: