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

Clean up GraphQL tests

This commit is contained in:
jeremystretch
2021-06-25 10:14:06 -04:00
parent d5675a5d4a
commit 4c209ed74c
4 changed files with 20 additions and 22 deletions

View File

@@ -428,7 +428,7 @@ class APIViewTestCases:
@override_settings(LOGIN_REQUIRED=True)
def test_graphql_get_object(self):
url = reverse('graphql')
object_type = self.model._meta.verbose_name.replace(' ', '_')
object_type = self.model._meta.verbose_name.lower().replace(' ', '_')
object_id = self._get_queryset().first().pk
query = f"""
{{
@@ -459,7 +459,7 @@ class APIViewTestCases:
@override_settings(LOGIN_REQUIRED=True)
def test_graphql_list_objects(self):
url = reverse('graphql')
object_type = self.model._meta.verbose_name_plural.replace(' ', '_')
object_type = self.model._meta.verbose_name_plural.lower().replace(' ', '_')
query = f"""
{{
{object_type} {{