Skip to content

Commit

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

def __init__(self, get_response):
# TODO: passing None to get_response will be deprecated after
def __init__(self, get_response=None):
super().__init__()
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'))
Expand Down
2 changes: 1 addition & 1 deletion edxval/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ def post(self, request):

try:
validate_generated_images(generated_images, LIST_MAX_ITEMS)
except Exception as e: # pylint: disable=broad-except
except Exception as e:
return Response(
status=status.HTTP_400_BAD_REQUEST,
data={'message': str(e)}
Expand Down

0 comments on commit 8e1137b

Please sign in to comment.