1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

9856 temp fix tests

This commit is contained in:
Arthur
2024-03-13 11:51:37 -07:00
parent 1da5219563
commit 151717545a
2 changed files with 4 additions and 2 deletions

View File

@ -36,6 +36,7 @@ class NetBoxGraphQLView(GraphQLView):
# Enforce LOGIN_REQUIRED
if settings.LOGIN_REQUIRED and not request.user.is_authenticated:
return redirect_to_login(reverse('graphql'))
# return redirect_to_login(reverse('graphql'))
return HttpResponseForbidden("No credentials provided.")
return super().dispatch(request, *args, **kwargs)

View File

@ -33,4 +33,5 @@ class GraphQLTestCase(TestCase):
self.client.logout()
response = self.client.get(url, **header)
with disable_warnings('django.request'):
self.assertHttpStatus(response, 302) # Redirect to login page
# self.assertHttpStatus(response, 302) # Redirect to login page
self.assertHttpStatus(response, 403) # Redirect to login page