aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/tests
diff options
context:
space:
mode:
authorJamie Matthews2012-10-24 11:27:01 +0100
committerJamie Matthews2012-10-24 11:27:01 +0100
commit388a807f64f60d84556288e2ade4f0fe57a8e66b (patch)
treec7b376e48df0e781e195592b625e3fcd940c2e5f /rest_framework/tests
parent51fae73f3d565e2702c72ff9841cc072d6490804 (diff)
downloaddjango-rest-framework-388a807f64f60d84556288e2ade4f0fe57a8e66b.tar.bz2
Switch from clean_<fieldname> to validate_<fieldname>, clarify documentation
Diffstat (limited to 'rest_framework/tests')
-rw-r--r--rest_framework/tests/serializer.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/rest_framework/tests/serializer.py b/rest_framework/tests/serializer.py
index 35908449..a32de80d 100644
--- a/rest_framework/tests/serializer.py
+++ b/rest_framework/tests/serializer.py
@@ -142,7 +142,7 @@ class ValidationTests(TestCase):
class CommentSerializerWithFieldValidator(CommentSerializer):
- def clean_content(self, attrs, source):
+ def validate_content(self, attrs, source):
value = attrs[source]
if "test" not in value:
raise serializers.ValidationError("Test not in value")