[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot] 2023-09-28 14:24:46 +00:00 committed by Emil Stenström
parent a919b648b3
commit 6a633c67a8
2 changed files with 19 additions and 8 deletions

View file

@ -399,8 +399,14 @@ class ComponentMediaRenderingTests(SimpleTestCase):
request = Mock()
self.assertEqual(response, middleware(request=request))
def test_middleware_response_with_components_with_slash_dash_and_underscore(self):
component_names = ["test-component", "test/component", "test_component"]
def test_middleware_response_with_components_with_slash_dash_and_underscore(
self,
):
component_names = [
"test-component",
"test/component",
"test_component",
]
for component_name in component_names:
component.registry.register(
name=component_name, component=SimpleComponent
@ -412,8 +418,11 @@ class ComponentMediaRenderingTests(SimpleTestCase):
f"{{% component '{component_name}' variable='value' %}}"
)
rendered = create_and_process_template_response(template)
self.assertEqual((
'<script src="script.js"></script>'
'<link href="style.css" media="all" rel="stylesheet">'
"Variable: <strong>value</strong>\n"
), rendered)
self.assertEqual(
(
'<script src="script.js"></script>'
'<link href="style.css" media="all" rel="stylesheet">'
"Variable: <strong>value</strong>\n"
),
rendered,
)