mirror of
https://github.com/netbox-community/netbox.git
synced 2026-04-10 03:13:48 +02:00
Add 'display' field to all REST API serializers
This commit is contained in:
@@ -20,7 +20,7 @@ class AppTest(APITestCase):
|
||||
class UserTest(APIViewTestCases.APIViewTestCase):
|
||||
model = User
|
||||
view_namespace = 'users'
|
||||
brief_fields = ['id', 'url', 'username']
|
||||
brief_fields = ['display', 'id', 'url', 'username']
|
||||
validation_excluded_fields = ['password']
|
||||
create_data = [
|
||||
{
|
||||
@@ -51,7 +51,7 @@ class UserTest(APIViewTestCases.APIViewTestCase):
|
||||
class GroupTest(APIViewTestCases.APIViewTestCase):
|
||||
model = Group
|
||||
view_namespace = 'users'
|
||||
brief_fields = ['id', 'name', 'url']
|
||||
brief_fields = ['display', 'id', 'name', 'url']
|
||||
create_data = [
|
||||
{
|
||||
'name': 'Group 4',
|
||||
@@ -77,7 +77,7 @@ class GroupTest(APIViewTestCases.APIViewTestCase):
|
||||
|
||||
class ObjectPermissionTest(APIViewTestCases.APIViewTestCase):
|
||||
model = ObjectPermission
|
||||
brief_fields = ['actions', 'enabled', 'groups', 'id', 'name', 'object_types', 'url', 'users']
|
||||
brief_fields = ['actions', 'display', 'enabled', 'groups', 'id', 'name', 'object_types', 'url', 'users']
|
||||
|
||||
@classmethod
|
||||
def setUpTestData(cls):
|
||||
|
||||
Reference in New Issue
Block a user