                  model = RegularFieldsModel
                  fields = ('auto_field', 'invalid')
  
          with self.assertRaises(ImproperlyConfigured) as excinfo:
              TestSerializer()
          expected = 'Field name `invalid` is not valid for model `ModelBase`.'
          assert str(excinfo.exception) == expected
  
      def test_missing_field(self):
          """
 
</s> remove             TestSerializer()
 </s> add             TestSerializer().fields </s> remove     def _get_base_fields(self):
 </s> add     def get_fields(self): </s> remove             TestSerializer(validators=[<UniqueForDateValidator(queryset=HiddenFieldUniqueForDateModel.objects.all(), field='slug', date_field='published')>]):
 </s> add             TestSerializer(): </s> remove             TestSerializer(validators=[<UniqueForDateValidator(queryset=HiddenFieldUniqueForDateModel.objects.all(), field='slug', date_field='published')>]):
 </s> add             TestSerializer():
            TestSerializer().fields
                  model = RegularFieldsModel
                  fields = ('auto_field', 'invalid')
  
          with self.assertRaises(ImproperlyConfigured) as excinfo:
            TestSerializer().fields
          expected = 'Field name `invalid` is not valid for model `ModelBase`.'
          assert str(excinfo.exception) == expected
  
      def test_missing_field(self):
          """
keep keep keep keep replace keep keep keep keep keep
 Lazy loading of fields and validators. Closes #1963. 
tests/test_model_serializer.py