mirror of
https://github.com/django-components/django-components.git
synced 2025-09-01 19:57:21 +00:00
Reformat lines that became too long. And enforce 119 line length.
This commit is contained in:
parent
ef6a082238
commit
48fe8171b4
25 changed files with 314 additions and 733 deletions
|
@ -234,9 +234,7 @@ class InlineComponentTest(SimpleTestCase):
|
|||
css = "path/to/style.css"
|
||||
js = "path/to/script.js"
|
||||
|
||||
comp = HTMLStringFileCSSJSComponent(
|
||||
"html_string_file_css_js_component"
|
||||
)
|
||||
comp = HTMLStringFileCSSJSComponent("html_string_file_css_js_component")
|
||||
self.assertHTMLEqual(
|
||||
comp.render(Context({})),
|
||||
"<div class='html-string-file'>Content</div>",
|
||||
|
@ -259,9 +257,7 @@ class InlineComponentTest(SimpleTestCase):
|
|||
class Media:
|
||||
css = "path/to/style.css"
|
||||
|
||||
comp = HTMLStringFileCSSJSComponent(
|
||||
"html_string_file_css_js_component"
|
||||
)
|
||||
comp = HTMLStringFileCSSJSComponent("html_string_file_css_js_component")
|
||||
self.assertHTMLEqual(
|
||||
comp.render(Context({})),
|
||||
"<div class='html-string-file'>Content</div>",
|
||||
|
@ -284,9 +280,7 @@ class InlineComponentTest(SimpleTestCase):
|
|||
class Media:
|
||||
js = "path/to/script.js"
|
||||
|
||||
comp = HTMLStringFileCSSJSComponent(
|
||||
"html_string_file_css_js_component"
|
||||
)
|
||||
comp = HTMLStringFileCSSJSComponent("html_string_file_css_js_component")
|
||||
self.assertHTMLEqual(
|
||||
comp.render(Context({})),
|
||||
"<div class='html-string-file'>Content</div>",
|
||||
|
@ -303,9 +297,7 @@ class InlineComponentTest(SimpleTestCase):
|
|||
def test_component_with_variable_in_html(self):
|
||||
class VariableHTMLComponent(component.Component):
|
||||
def get_template(self, context):
|
||||
return Template(
|
||||
"<div class='variable-html'>{{ variable }}</div>"
|
||||
)
|
||||
return Template("<div class='variable-html'>{{ variable }}</div>")
|
||||
|
||||
comp = VariableHTMLComponent("variable_html_component")
|
||||
context = Context({"variable": "Dynamic Content"})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue