mirror of
https://github.com/django-components/django-components.git
synced 2025-08-31 03:07:19 +00:00
feat: Add support for HTML fragments (#845)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
6681fc0085
commit
4dab940db8
26 changed files with 1225 additions and 246 deletions
|
@ -49,7 +49,7 @@ class InlineComponentTest(BaseTestCase):
|
|||
rendered,
|
||||
)
|
||||
self.assertInHTML(
|
||||
"<script>eval(Components.unescapeJs(`console.log('HTML and JS only');`))</script>",
|
||||
"<script>console.log('HTML and JS only');</script>",
|
||||
rendered,
|
||||
)
|
||||
|
||||
|
@ -106,7 +106,7 @@ class ComponentMediaTests(BaseTestCase):
|
|||
self.assertEqual(rendered.count("<style"), 0)
|
||||
self.assertEqual(rendered.count("<link"), 0)
|
||||
|
||||
self.assertEqual(rendered.count("<script"), 2) # 2 Boilerplate scripts
|
||||
self.assertEqual(rendered.count("<script"), 1) # 1 Boilerplate script
|
||||
|
||||
def test_css_js_as_lists(self):
|
||||
class SimpleComponent(Component):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue