mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-14 01:41:22 -06:00
10472 graphene 3 (#10473)
* update to Graphene 3.0.0 * 10472 exempt view permissions on tests * 10472 exempt permission check on graphql tests
This commit is contained in:
parent
c481a1b6a2
commit
24ba840be7
@ -1,6 +1,6 @@
|
||||
from graphene import Scalar
|
||||
from graphql.language import ast
|
||||
from graphql.type.scalars import MAX_INT, MIN_INT
|
||||
from graphene.types.scalars import MAX_INT, MIN_INT
|
||||
|
||||
|
||||
class BigInt(Scalar):
|
||||
|
@ -12,12 +12,12 @@ from wireless.graphql.schema import WirelessQuery
|
||||
|
||||
|
||||
class Query(
|
||||
UsersQuery,
|
||||
CircuitsQuery,
|
||||
DCIMQuery,
|
||||
ExtrasQuery,
|
||||
IPAMQuery,
|
||||
TenancyQuery,
|
||||
UsersQuery,
|
||||
VirtualizationQuery,
|
||||
WirelessQuery,
|
||||
*registry['plugins']['graphql_schemas'], # Append plugin schemas
|
||||
|
@ -467,6 +467,7 @@ class APIViewTestCases:
|
||||
return query
|
||||
|
||||
@override_settings(LOGIN_REQUIRED=True)
|
||||
@override_settings(EXEMPT_VIEW_PERMISSIONS=['*', 'auth.user'])
|
||||
def test_graphql_get_object(self):
|
||||
url = reverse('graphql')
|
||||
field_name = self._get_graphql_base_name()
|
||||
@ -492,6 +493,7 @@ class APIViewTestCases:
|
||||
self.assertNotIn('errors', data)
|
||||
|
||||
@override_settings(LOGIN_REQUIRED=True)
|
||||
@override_settings(EXEMPT_VIEW_PERMISSIONS=['*', 'auth.user'])
|
||||
def test_graphql_list_objects(self):
|
||||
url = reverse('graphql')
|
||||
field_name = f'{self._get_graphql_base_name()}_list'
|
||||
|
@ -15,7 +15,7 @@ django-taggit==3.0.0
|
||||
django-timezone-field==5.0
|
||||
djangorestframework==3.14.0
|
||||
drf-yasg[validation]==1.21.4
|
||||
graphene-django==2.15.0
|
||||
graphene-django==3.0.0
|
||||
gunicorn==20.1.0
|
||||
Jinja2==3.1.2
|
||||
Markdown==3.3.7
|
||||
|
Loading…
Reference in New Issue
Block a user