From 3050dc71b954abe40ea8ebae86d3a2530b92226e Mon Sep 17 00:00:00 2001 From: Juro Oravec Date: Thu, 11 Apr 2024 23:44:36 +0200 Subject: [PATCH] refactor: add test --- tests/test_component.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tests/test_component.py b/tests/test_component.py index 3c8e3423..7cf41a5f 100644 --- a/tests/test_component.py +++ b/tests/test_component.py @@ -186,6 +186,24 @@ class ComponentTest(SimpleTestCase): ), ) + def test_component_with_relative_paths_as_subcomponent( + self, + ): + template = Template( + """ + {% load component_tags %}{% component_dependencies %} + {% component 'parent_component' %} + {% fill 'content' %} + {% component name='relative_file_component' variable='hello' %} + {% endcomponent %} + {% endfill %} + {% endcomponent %} + """ # NOQA + ) + rendered = template.render(Context({})) + + self.assertIn('', rendered, rendered) + class InlineComponentTest(SimpleTestCase): def test_inline_html_component(self):