summaryrefslogtreecommitdiff
path: root/tests/modeltests/choices/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/modeltests/choices/models.py')
-rw-r--r--tests/modeltests/choices/models.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/modeltests/choices/models.py b/tests/modeltests/choices/models.py
index 550e655e46..e378260598 100644
--- a/tests/modeltests/choices/models.py
+++ b/tests/modeltests/choices/models.py
@@ -36,4 +36,15 @@ __test__ = {'API_TESTS':"""
u'Male'
>>> s.get_gender_display()
u'Female'
+
+# If the value for the field doesn't correspond to a valid choice,
+# the value itself is provided as a display value.
+>>> a.gender = ''
+>>> a.get_gender_display()
+u''
+
+>>> a.gender = 'U'
+>>> a.get_gender_display()
+u'U'
+
"""}