mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Add 'display' field to all REST API serializers
This commit is contained in:
@@ -19,7 +19,7 @@ class AppTest(APITestCase):
|
||||
|
||||
class ClusterTypeTest(APIViewTestCases.APIViewTestCase):
|
||||
model = ClusterType
|
||||
brief_fields = ['cluster_count', 'id', 'name', 'slug', 'url']
|
||||
brief_fields = ['cluster_count', 'display', 'id', 'name', 'slug', 'url']
|
||||
create_data = [
|
||||
{
|
||||
'name': 'Cluster Type 4',
|
||||
@@ -51,7 +51,7 @@ class ClusterTypeTest(APIViewTestCases.APIViewTestCase):
|
||||
|
||||
class ClusterGroupTest(APIViewTestCases.APIViewTestCase):
|
||||
model = ClusterGroup
|
||||
brief_fields = ['cluster_count', 'id', 'name', 'slug', 'url']
|
||||
brief_fields = ['cluster_count', 'display', 'id', 'name', 'slug', 'url']
|
||||
create_data = [
|
||||
{
|
||||
'name': 'Cluster Group 4',
|
||||
@@ -83,7 +83,7 @@ class ClusterGroupTest(APIViewTestCases.APIViewTestCase):
|
||||
|
||||
class ClusterTest(APIViewTestCases.APIViewTestCase):
|
||||
model = Cluster
|
||||
brief_fields = ['id', 'name', 'url', 'virtualmachine_count']
|
||||
brief_fields = ['display', 'id', 'name', 'url', 'virtualmachine_count']
|
||||
bulk_update_data = {
|
||||
'comments': 'New comment',
|
||||
}
|
||||
@@ -131,7 +131,7 @@ class ClusterTest(APIViewTestCases.APIViewTestCase):
|
||||
|
||||
class VirtualMachineTest(APIViewTestCases.APIViewTestCase):
|
||||
model = VirtualMachine
|
||||
brief_fields = ['id', 'name', 'url']
|
||||
brief_fields = ['display', 'id', 'name', 'url']
|
||||
bulk_update_data = {
|
||||
'status': 'staged',
|
||||
}
|
||||
@@ -207,7 +207,7 @@ class VirtualMachineTest(APIViewTestCases.APIViewTestCase):
|
||||
|
||||
class VMInterfaceTest(APIViewTestCases.APIViewTestCase):
|
||||
model = VMInterface
|
||||
brief_fields = ['id', 'name', 'url', 'virtual_machine']
|
||||
brief_fields = ['display', 'id', 'name', 'url', 'virtual_machine']
|
||||
bulk_update_data = {
|
||||
'description': 'New description',
|
||||
}
|
||||
|
Reference in New Issue
Block a user