Skip to content

Commit d797389

Browse files
committed
Fixed broken test for Django < 1.9
This test was incorrectly checking that there were no validators set in older versions of Django, even though it should have been checking for the two validators that were set up on the model field level. The originally regression test that this fixes was added in 7d79cf3 when fixing an issue with the `DecimalValidator`.
1 parent 87605e1 commit d797389

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/test_model_serializer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -884,7 +884,7 @@ class Meta:
884884

885885
serializer = TestSerializer()
886886

887-
assert len(serializer.fields['decimal_field'].validators) == 0
887+
assert len(serializer.fields['decimal_field'].validators) == 2
888888

889889
@pytest.mark.skipif(DecimalValidator is None,
890890
reason='DecimalValidator is available in Django 1.9+')

0 commit comments

Comments
 (0)