# -*- coding: utf-8 -*-
from importlib import import_module

from django.template.loader import get_template
from django.test import SimpleTestCase

from ocyan.plugin.roadrunner_bs5.models import RoadrunnerPage


class RoadrunnerBs5SmokeTests(SimpleTestCase):
    def test_app_import(self):
        module = import_module("ocyan.plugin.roadrunner_bs5")
        self.assertTrue(hasattr(module, "RoadrunnerBootstrap5Config"))

    def test_page_model_import(self):
        self.assertEqual(RoadrunnerPage.__name__, "RoadrunnerPage")

    def test_roadrunner_page_template_loads(self):
        template = get_template("roadrunner/roadrunner_page.html")
        self.assertIsNotNone(template)

    def test_wagtail_hooks_imports(self):
        module = import_module("ocyan.plugin.roadrunner_bs5.wagtail_hooks")
        self.assertIsNotNone(module)
