mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
9856 core test sans DjangoModelType
This commit is contained in:
@ -20,7 +20,7 @@ __all__ = (
|
|||||||
filters=DataFileFilter
|
filters=DataFileFilter
|
||||||
)
|
)
|
||||||
class DataFileType(BaseObjectType):
|
class DataFileType(BaseObjectType):
|
||||||
pass
|
source: Annotated["DataSourceType", strawberry.lazy('core.graphql.types')]
|
||||||
|
|
||||||
|
|
||||||
@strawberry_django.type(
|
@strawberry_django.type(
|
||||||
|
@ -472,8 +472,10 @@ class APIViewTestCases:
|
|||||||
# this would require a fragment query
|
# this would require a fragment query
|
||||||
continue
|
continue
|
||||||
elif field.type is strawberry_django.fields.types.DjangoModelType:
|
elif field.type is strawberry_django.fields.types.DjangoModelType:
|
||||||
|
print("")
|
||||||
print("")
|
print("")
|
||||||
print("DjangoModelType")
|
print("DjangoModelType")
|
||||||
|
print("--------------------------")
|
||||||
print(f"{self.model} -> {field.name}")
|
print(f"{self.model} -> {field.name}")
|
||||||
print("")
|
print("")
|
||||||
# Dynamic fields must specify a subselection
|
# Dynamic fields must specify a subselection
|
||||||
@ -482,8 +484,10 @@ class APIViewTestCases:
|
|||||||
if type(field.type.of_type) is LazyType:
|
if type(field.type.of_type) is LazyType:
|
||||||
fields_string += f'{field.name} {{ id }}\n'
|
fields_string += f'{field.name} {{ id }}\n'
|
||||||
elif field.type.of_type == strawberry_django.fields.types.DjangoModelType:
|
elif field.type.of_type == strawberry_django.fields.types.DjangoModelType:
|
||||||
|
print("")
|
||||||
print("")
|
print("")
|
||||||
print("DjangoModelType")
|
print("DjangoModelType")
|
||||||
|
print("--------------------------")
|
||||||
print(f"{self.model} -> {field.name}")
|
print(f"{self.model} -> {field.name}")
|
||||||
print("")
|
print("")
|
||||||
fields_string += f'{field.name} {{ id }}\n'
|
fields_string += f'{field.name} {{ id }}\n'
|
||||||
|
Reference in New Issue
Block a user