mirror of
https://github.com/django-components/django-components.git
synced 2025-08-29 02:14:05 +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
|
@ -8,9 +8,7 @@ from django_components.middleware import ComponentDependencyMiddleware
|
|||
|
||||
# Create middleware instance
|
||||
response_stash = None
|
||||
middleware = ComponentDependencyMiddleware(
|
||||
get_response=lambda _: response_stash
|
||||
)
|
||||
middleware = ComponentDependencyMiddleware(get_response=lambda _: response_stash)
|
||||
|
||||
|
||||
class Django30CompatibleSimpleTestCase(SimpleTestCase):
|
||||
|
@ -19,9 +17,7 @@ class Django30CompatibleSimpleTestCase(SimpleTestCase):
|
|||
left = left.replace(' type="text/css"', "")
|
||||
right = right.replace(' type="text/javascript"', "")
|
||||
right = right.replace(' type="text/css"', "")
|
||||
super(Django30CompatibleSimpleTestCase, self).assertHTMLEqual(
|
||||
left, right
|
||||
)
|
||||
super(Django30CompatibleSimpleTestCase, self).assertHTMLEqual(left, right)
|
||||
|
||||
def assertInHTML(self, needle, haystack, count=None, msg_prefix=""):
|
||||
haystack = haystack.replace(' type="text/javascript"', "")
|
||||
|
@ -37,9 +33,7 @@ request = Mock()
|
|||
mock_template = Mock()
|
||||
|
||||
|
||||
def create_and_process_template_response(
|
||||
template, context=None, use_middleware=True
|
||||
):
|
||||
def create_and_process_template_response(template, context=None, use_middleware=True):
|
||||
context = context if context is not None else Context({})
|
||||
mock_template.render = lambda context, _: template.render(context)
|
||||
response = TemplateResponse(request, mock_template, context)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue