summaryrefslogtreecommitdiff
path: root/tests/modeltests/choices/models.py
diff options
context:
space:
mode:
authorJannis Leidel <jannis@leidel.info>2010-09-10 20:54:01 +0000
committerJannis Leidel <jannis@leidel.info>2010-09-10 20:54:01 +0000
commit7543eb95e6cb6c6dd4f900e0ecdfa71fa411cdea (patch)
treedbcb4602ae1cc10e2a248d2fe86584f58e2eac57 /tests/modeltests/choices/models.py
parentbb00b2839980145984c487410fc65fbc0c94be3d (diff)
Converted doctest to unittest. Patch by Alex Gaynor.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13725 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/modeltests/choices/models.py')
-rw-r--r--tests/modeltests/choices/models.py26
1 files changed, 0 insertions, 26 deletions
diff --git a/tests/modeltests/choices/models.py b/tests/modeltests/choices/models.py
index e378260598..27316f5dea 100644
--- a/tests/modeltests/choices/models.py
+++ b/tests/modeltests/choices/models.py
@@ -22,29 +22,3 @@ class Person(models.Model):
def __unicode__(self):
return self.name
-
-__test__ = {'API_TESTS':"""
->>> a = Person(name='Adrian', gender='M')
->>> a.save()
->>> s = Person(name='Sara', gender='F')
->>> s.save()
->>> a.gender
-'M'
->>> s.gender
-'F'
->>> a.get_gender_display()
-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'
-
-"""}