From e49d22dbda5ac889ab89f277e17752c840819de2 Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Wed, 19 Nov 2014 09:31:26 +0000 Subject: Allow blank choices to render. Closes #2071. --- tests/test_fields.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/test_fields.py b/tests/test_fields.py index 5db381ac..13525632 100644 --- a/tests/test_fields.py +++ b/tests/test_fields.py @@ -793,7 +793,8 @@ class TestChoiceField(FieldValues): 'amazing': ['`amazing` is not a valid choice.'] } outputs = { - 'good': 'good' + 'good': 'good', + '': '' } field = serializers.ChoiceField( choices=[ -- cgit v1.2.3 From 8586290df80ac8448d71cdb3326bc822c399cad1 Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Wed, 19 Nov 2014 13:55:10 +0000 Subject: Apply defaults and requiredness to unique_together fields. Closes #2092. --- tests/test_validators.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/test_validators.py b/tests/test_validators.py index 86614b10..1df0641c 100644 --- a/tests/test_validators.py +++ b/tests/test_validators.py @@ -88,8 +88,8 @@ class TestUniquenessTogetherValidation(TestCase): expected = dedent(""" UniquenessTogetherSerializer(): id = IntegerField(label='ID', read_only=True) - race_name = CharField(max_length=100) - position = IntegerField() + race_name = CharField(max_length=100, required=True) + position = IntegerField(required=True) class Meta: validators = [] """) -- cgit v1.2.3