summaryrefslogtreecommitdiff
path: root/parts/django/tests/modeltests/choices/tests.py
diff options
context:
space:
mode:
authorNishanth Amuluru2011-01-11 22:41:51 +0530
committerNishanth Amuluru2011-01-11 22:41:51 +0530
commitb03203c8cb991c16ac8a3d74c8c4078182d0bb48 (patch)
tree7cf13b2deacbfaaec99edb431b83ddd5ea734a52 /parts/django/tests/modeltests/choices/tests.py
parent0c50203cd9eb94b819883c3110922e873f003138 (diff)
downloadpytask-b03203c8cb991c16ac8a3d74c8c4078182d0bb48.tar.gz
pytask-b03203c8cb991c16ac8a3d74c8c4078182d0bb48.tar.bz2
pytask-b03203c8cb991c16ac8a3d74c8c4078182d0bb48.zip
removed all the buildout files
Diffstat (limited to 'parts/django/tests/modeltests/choices/tests.py')
-rw-r--r--parts/django/tests/modeltests/choices/tests.py23
1 files changed, 0 insertions, 23 deletions
diff --git a/parts/django/tests/modeltests/choices/tests.py b/parts/django/tests/modeltests/choices/tests.py
deleted file mode 100644
index 09023d8..0000000
--- a/parts/django/tests/modeltests/choices/tests.py
+++ /dev/null
@@ -1,23 +0,0 @@
-from django.test import TestCase
-
-from models import Person
-
-
-class ChoicesTests(TestCase):
- def test_display(self):
- a = Person.objects.create(name='Adrian', gender='M')
- s = Person.objects.create(name='Sara', gender='F')
- self.assertEqual(a.gender, 'M')
- self.assertEqual(s.gender, 'F')
-
- self.assertEqual(a.get_gender_display(), 'Male')
- self.assertEqual(s.get_gender_display(), '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 = ''
- self.assertEqual(a.get_gender_display(), '')
-
- a.gender = 'U'
- self.assertEqual(a.get_gender_display(), 'U')
-