1
0
mirror of https://github.com/django/django.git synced 2025-10-23 21:59:11 +00:00

Removed redundant model field choices tests.

This commit is contained in:
Matthias Kestenholz
2019-03-23 17:04:39 +01:00
committed by Tim Graham
parent 2ee1e1a174
commit ea60b7bc74
5 changed files with 8 additions and 50 deletions

View File

@@ -162,6 +162,12 @@ class GetFieldDisplayTests(SimpleTestCase):
self.assertEqual(Whiz(c='').get_c_display(), '') # Empty value
self.assertEqual(WhizDelayed(c=0).get_c_display(), 'Other') # Delayed choices
def test_get_FIELD_display_translated(self):
"""A translated display value is coerced to str."""
val = Whiz(c=5).get_c_display()
self.assertIsInstance(val, str)
self.assertEqual(val, 'translated')
def test_iterator_choices(self):
"""
get_choices() works with Iterators.