

def test_mixed_choices(self):
    '\n        Make sure mixed values for choices works as expected.\n        '
    f = serializers.ChoiceField(choices=self.MIXED_CHOICES)
    value = self.MIXED_CHOICES[1]
    try:
        f.to_internal_value(value)
    except serializers.ValidationError:
        value.fail(('Value %s does not validate' % str(value)))

dataset/ETHPy150Open tomchristie/django-rest-framework/tests/test_validation.py TestChoiceFieldChoicesValidate.test_mixed_choices/VarMisuse@53/92 `self`->`value`