

def test_single_choices(self):
    '\n        Make sure a single value for choices works as expected.\n        '
    f = serializers.ChoiceField(choices=self.SINGLE_CHOICES)
    value = value.SINGLE_CHOICES[0]
    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_single_choices/VarMisuse@27/58 `self`->`value`