This commit is contained in:
Dryice Liu 2017-05-29 08:27:07 +08:00
parent 04adfb9c94
commit 836328594b

View File

@ -63,6 +63,7 @@ class RegularFieldsModel(models.Model):
slug_field = models.SlugField(max_length=100)
small_integer_field = models.SmallIntegerField()
text_field = models.TextField(max_length=100)
file_field = models.FileField(max_length=100)
time_field = models.TimeField()
url_field = models.URLField(max_length=100)
custom_field = CustomField()
@ -181,6 +182,7 @@ class TestRegularFieldMappings(TestCase):
slug_field = SlugField(max_length=100)
small_integer_field = IntegerField()
text_field = CharField(max_length=100, style={'base_template': 'textarea.html'})
file_field = FileField(max_length=100)
time_field = TimeField()
url_field = URLField(max_length=100)
custom_field = ModelField(model_field=<tests.test_model_serializer.CustomField: custom_field>)