Skip to content

Commit

Permalink
fix: fix quality failures
Browse files Browse the repository at this point in the history
  • Loading branch information
iamsobanjaved committed May 20, 2024
1 parent 67e1728 commit 37a1685
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 1 addition & 2 deletions edx_django_utils/monitoring/internal/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,6 @@ class FrontendMonitoringMiddleware:
def __init__(self, get_response):
self.get_response = get_response


def __call__(self, request):
response = self.get_response(request)

Expand All @@ -500,7 +499,7 @@ def __call__(self, request):

def inject_script(self, content, script):
"""
Add script to the response, if body tag is present.
Add script to the response, if body tag is present.
"""
body = re.search(_HTML_BODY_REGEX, content, re.IGNORECASE)

Expand Down
1 change: 1 addition & 0 deletions edx_django_utils/monitoring/tests/test_middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@ def get_mock_request(self, cookies_dict):
factory.cookies[name] = value
return factory.request()


@ddt.ddt
class FrontendMonitoringMiddlewareTestCase(TestCase):
"""
Expand Down

0 comments on commit 37a1685

Please sign in to comment.