From d818e0c9b2b88276cc499974f9eee893170bf0a8 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Mon, 20 Jan 2014 10:45:21 +0800 Subject: Fixed #16905 -- Added extensible checks (nee validation) framework MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is the result of Christopher Medrela's 2013 Summer of Code project. Thanks also to Preston Holmes, Tim Graham, Anssi Kääriäinen, Florian Apolloner, and Alex Gaynor for review notes along the way. Also: Fixes #8579, fixes #3055, fixes #19844. --- tests/model_fields/tests.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests/model_fields') diff --git a/tests/model_fields/tests.py b/tests/model_fields/tests.py index d78f3d7c2d..45ffe44e7a 100644 --- a/tests/model_fields/tests.py +++ b/tests/model_fields/tests.py @@ -85,6 +85,11 @@ class BasicFieldTests(test.TestCase): klass = forms.TypedMultipleChoiceField self.assertIsInstance(field.formfield(choices_form_class=klass), klass) + def test_field_str(self): + from django.utils.encoding import force_str + f = Foo._meta.get_field('a') + self.assertEqual(force_str(f), "model_fields.Foo.a") + class DecimalFieldTests(test.TestCase): def test_to_python(self): -- cgit v1.3