Add 'display' field to all REST API serializers

This commit is contained in:
Jeremy Stretch
2021-03-16 10:06:25 -04:00
parent ee7f7c877a
commit fb48c1f6dd
26 changed files with 287 additions and 256 deletions

View File

@@ -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):