                  descriptive_field = IntegerField(help_text='Some help text', label='A label')
                  choices_field = ChoiceField(choices=(('red', 'Red'), ('blue', 'Blue'), ('green', 'Green')))
          """)
          self.assertEqual(repr(TestSerializer()), expected)
  
      # merge this into test_regular_fields / RegularFieldsModel when
      # Django 2.1 is the minimum supported version
      @pytest.mark.skipif(django.VERSION < (2, 1), reason='Django version < 2.1')
 
</s> remove     if isinstance(model_field, models.TextField) or (postgres_fields and isinstance(model_field, postgres_fields.JSONField)):
 </s> add     if isinstance(model_field, models.TextField) and not model_field.choices or \
            (postgres_fields and isinstance(model_field, postgres_fields.JSONField)):
                text_choices_field = ChoiceField(choices=(('red', 'Red'), ('blue', 'Blue'), ('green', 'Green')))
                  descriptive_field = IntegerField(help_text='Some help text', label='A label')
                  choices_field = ChoiceField(choices=(('red', 'Red'), ('blue', 'Blue'), ('green', 'Green')))
                text_choices_field = ChoiceField(choices=(('red', 'Red'), ('blue', 'Blue'), ('green', 'Green')))
          """)
          self.assertEqual(repr(TestSerializer()), expected)
  
      # merge this into test_regular_fields / RegularFieldsModel when
      # Django 2.1 is the minimum supported version
      @pytest.mark.skipif(django.VERSION < (2, 1), reason='Django version < 2.1')
keep add keep keep keep keep keep keep
 Changed default widget for TextField with choices to select (#6892) 
tests/test_model_serializer.py