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 42fbbb2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions edxval/pacts/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,9 @@ class AuthenticationMiddleware(MiddlewareMixin):
"""

def __init__(self, get_response):
super().__init__()
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
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 42fbbb2

Please sign in to comment.