                  1, 2,
              ]
          )
          field.choices = [1]
          assert field.run_validation(1) is 1
          with pytest.raises(serializers.ValidationError) as exc_info:
              field.run_validation(2)
          assert exc_info.value.detail == ['"2" is not a valid choice.']
  
  
 
</s> remove         for validators in ([raise_exception], (raise_exception,), set([raise_exception])):
 </s> add         for validators in ([raise_exception], (raise_exception,), {raise_exception}): </s> remove         assert len(flat_links) is 1
 </s> add         assert len(flat_links) == 1 </s> remove         assert isinstance(self.pagination.to_html(), six.text_type)
 </s> add         assert isinstance(self.pagination.to_html(), str) </s> remove         assert serializer.errors == {'target': ['Incorrect type. Expected pk value, received %s.' % six.text_type.__name__]}
 </s> add         assert serializer.errors == {'target': ['Incorrect type. Expected pk value, received str.']} </s> remove         super(NullBooleanField, self).__init__(**kwargs)
 </s> add         super().__init__(**kwargs)
        assert field.run_validation(1) == 1
                  1, 2,
              ]
          )
          field.choices = [1]
        assert field.run_validation(1) == 1
          with pytest.raises(serializers.ValidationError) as exc_info:
              field.run_validation(2)
          assert exc_info.value.detail == ['"2" is not a valid choice.']
  
  
keep keep keep keep replace keep keep keep keep keep
 Dropped Python 2 compatibility. (#6615)

Thanks to Jon Dufresne (@jdufresne) for review.

Co-authored-by: Asif Saif Uddin <auvipy@gmail.com>
Co-authored-by: Rizwan Mansuri <Rizwan@webbyfox.com> 
tests/test_fields.py