def test_mixed_choices(self):
        """
        Make sure mixed values for choices works as expected.
        """
        f = serializers.ChoiceField(choices=self.MIXED_CHOICES)
        value = self.MIXED_CHOICES[1]
        try:
            f.to_internal_value(value)
        except serializers.ValidationError:
            self.fail("Value %s does not validate" % str(value))
dataset/ETHPy150Open tomchristie/django-rest-framework/tests/test_validation.py/TestChoiceFieldChoicesValidate.test_mixed_choices/original