                  model = RegularFieldsModel
                  fields = ('auto_field',)
  
          with self.assertRaises(ImproperlyConfigured) as excinfo:
              TestSerializer()
          expected = (
              'Field `missing` has been declared on serializer '
              '`TestSerializer`, but is missing from `Meta.fields`.'
          )
          assert str(excinfo.exception) == expected
 
</s> remove             TestSerializer()
 </s> add             TestSerializer().fields </s> remove             ExampleSerializer()
 </s> add             ExampleSerializer().fields </s> remove             TestSerializer(validators=[<UniqueForDateValidator(queryset=HiddenFieldUniqueForDateModel.objects.all(), field='slug', date_field='published')>]):
 </s> add             TestSerializer(): </s> remove             ExampleSerializer()
 </s> add             ExampleSerializer().fields </s> remove             TestSerializer(validators=[<UniqueForDateValidator(queryset=HiddenFieldUniqueForDateModel.objects.all(), field='slug', date_field='published')>]):
 </s> add             TestSerializer():
            TestSerializer().fields
                  model = RegularFieldsModel
                  fields = ('auto_field',)
  
          with self.assertRaises(ImproperlyConfigured) as excinfo:
            TestSerializer().fields
          expected = (
              'Field `missing` has been declared on serializer '
              '`TestSerializer`, but is missing from `Meta.fields`.'
          )
          assert str(excinfo.exception) == expected
keep keep keep keep replace keep keep keep keep keep
 Lazy loading of fields and validators. Closes #1963. 
tests/test_model_serializer.py