CustomField.type to slug

This commit is contained in:
Jeremy Stretch
2019-12-04 20:58:26 -05:00
parent ca11b9a2f5
commit 3ff22bea56
11 changed files with 123 additions and 64 deletions

View File

@@ -3,6 +3,7 @@ from django.urls import reverse
from rest_framework import status
from dcim.models import Site
from extras.choices import *
from extras.constants import *
from extras.models import CustomField, CustomFieldValue, ObjectChange
from utilities.testing import APITestCase
@@ -17,7 +18,7 @@ class ChangeLogTest(APITestCase):
# Create a custom field on the Site model
ct = ContentType.objects.get_for_model(Site)
cf = CustomField(
type=CF_TYPE_TEXT,
type=CustomFieldTypeChoices.TYPE_TEXT,
name='my_field',
required=False
)