Initial commit
This commit is contained in:
@@ -0,0 +1 @@
|
||||
<div class="rich-text">{{ html|safe }}</div>
|
||||
0
env/lib/python3.10/site-packages/wagtail/contrib/legacy/richtext/tests/__init__.py
vendored
Normal file
0
env/lib/python3.10/site-packages/wagtail/contrib/legacy/richtext/tests/__init__.py
vendored
Normal file
Binary file not shown.
Binary file not shown.
14
env/lib/python3.10/site-packages/wagtail/contrib/legacy/richtext/tests/test_templatetag.py
vendored
Normal file
14
env/lib/python3.10/site-packages/wagtail/contrib/legacy/richtext/tests/test_templatetag.py
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
from django.test import TestCase
|
||||
|
||||
from wagtail.templatetags.wagtailcore_tags import richtext
|
||||
|
||||
|
||||
class TestTemplateTag(TestCase):
|
||||
def test_no_contrib_legacy_richtext_no_wrapper(self):
|
||||
self.assertEqual(richtext("Foo"), "Foo")
|
||||
|
||||
def test_contrib_legacy_richtext_renders_wrapper(self):
|
||||
with self.modify_settings(
|
||||
INSTALLED_APPS={"prepend": "wagtail.contrib.legacy.richtext"}
|
||||
):
|
||||
self.assertEqual(richtext("Foo"), """<div class="rich-text">Foo</div>""")
|
||||
Reference in New Issue
Block a user