Skip to content

Commit

Permalink
chore: nit
Browse files Browse the repository at this point in the history
  • Loading branch information
DawoudSheraz committed Mar 8, 2024
1 parent dc683c9 commit 21ffc35
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions edxval/pacts/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@ class AuthenticationMiddleware(MiddlewareMixin):
See https://docs.pact.io/faq#how-do-i-test-oauth-or-other-security-headers
"""

def __init__(self, get_response): # pylint: disable=no-value-for-parameter
super().__init__()
def __init__(self, get_response):
super().__init__(get_response)

Check warning on line 22 in edxval/pacts/middleware.py

View check run for this annotation

Codecov / codecov/patch

edxval/pacts/middleware.py#L22

Added line #L22 was not covered by tests
self.auth_user = User.objects.get_or_create(username='edx', is_staff=True)[0]
self.auth_user.user_permissions.set(Permission.objects.filter(content_type__app_label='edxval'))
self.get_response = get_response

def process_view(self, request, view_func, view_args, view_kwargs): # pylint: disable=unused-argument
"""
Expand Down

0 comments on commit 21ffc35

Please sign in to comment.