@@ -0,0 +1,1202 @@
+#!/usr/bin/env python%0A# -*- coding: utf-8 -*-%0A%0A%0A%22%22%22%0Atest_in_serializers%0A-------------------%0A%0ATests of the fields cooperation in the serializer interfaces for serialization, de-serialization,%0Aand validation.%0A%0A%22%22%22%0A%0A%0A# Django settings:%0Aimport os%0Aos.environ%5B'DJANGO_SETTINGS_MODULE'%5D = __name__%0A%0Afrom django.conf.global_settings import CACHES%0ASECRET_KEY = 's3cr3t'%0A%0A%0Aimport unittest%0A%0Afrom rest_framework import serializers%0Afrom rest_framework.compat import six%0A%0Afrom drf_compound_fields.fields import DictField%0Afrom drf_compound_fields.fields import ListField%0A%0A%0Aclass DemoSerializer(serializers.Serializer):%0A    name = ListField(serializers.CharField(), required=False)%0A    emails = ListField(serializers.EmailField(), required=False)%0A%0A%0Aclass TestSerializerListField(unittest.TestCase):%0A    %22%22%22%0A    Tests for the ListField behavior%0A    %22%22%22%0A%0A    def test_non_list_not_valid(self):%0A        serializer = DemoSerializer(data=%7B'name': 'notAList'%7D)%0A        self.assertFalse(serializer.is_valid())%0A%0A    def test_non_list_errors(self):%0A        serializer = DemoSerializer(data=%7B'name': 'notAList'%7D)%0A        self.assertIn('name', serializer.errors)%0A        self.assertTrue(serializer.errors%5B'name'%5D, six.text_type)%0A

Add tests of fields in serializers