From d797389cf784b3e55179f5bcea51379d2d37f42c Mon Sep 17 00:00:00 2001 From: Kevin Brown Date: Thu, 24 Dec 2015 18:17:58 -0500 Subject: [PATCH] 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 https://github.com/tomchristie/django-rest-framework/commit/7d79cf35b7be01b175d8c25276a4414e8144a16b when fixing an issue with the `DecimalValidator`. --- tests/test_model_serializer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_model_serializer.py b/tests/test_model_serializer.py index e2c3a7a47..2976b1984 100644 --- a/tests/test_model_serializer.py +++ b/tests/test_model_serializer.py @@ -884,7 +884,7 @@ class TestDecimalFieldMappings(TestCase): serializer = TestSerializer() - assert len(serializer.fields['decimal_field'].validators) == 0 + assert len(serializer.fields['decimal_field'].validators) == 2 @pytest.mark.skipif(DecimalValidator is None, reason='DecimalValidator is available in Django 1.9+')